I tried to train a model using the command in clara_xray_classification_chest_amp/commands with own dataset.
I changed several configurations in the config directory to use my new dataset.
My dataset got only 1 class (positive or negative).
After I run the training script, the training process using the training key set seems to work fine but when it comes to the validation key set it throws errors as follows:
Exception: <class 'ValueError'>: Input contains NaN, infinity or a value too large for dtype('float32'). File "workflows/fitters/supervised_fitter.py", line 224, in fit File "workflows/fitters/supervised_fitter.py", line 625, in _do_fit File "components/metrics/metric.py", line 89, in get File "libs/metrics/auc.py", line 64, in get File "/usr/local/lib/python3.6/dist-packages/sklearn/metrics/ranking.py", line 355, in roc_auc_score sample_weight=sample_weight) File "/usr/local/lib/python3.6/dist-packages/sklearn/metrics/base.py", line 80, in _average_binary_score y_score = check_array(y_score) File "/usr/local/lib/python3.6/dist-packages/sklearn/utils/validation.py", line 542, in check_array allow_nan=force_all_finite == 'allow-nan') File "/usr/local/lib/python3.6/dist-packages/sklearn/utils/validation.py", line 56, in _assert_all_finite raise ValueError(msg_err.format(type_err, X.dtype))
I found that if the data in the validation key set were labeled with different classes it will throw the errors.
I am not sure how to fix this problem.