Training...
/Users/demainchen/Downloads/Struct2Graph-master/k-fold-CV.py:282: RuntimeWarning: invalid value encountered in double_scalars
MCC = float(tptn-fpfn)/(np.sqrt((tp+fp)(tp+fn)(tn+fp)*(tn+fn)))
Traceback (most recent call last):
File "", line 1, in
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/Users/demainchen/Downloads/Struct2Graph-master/k-fold-CV.py", line 388, in
accuracy, precision, recall, sensitivity, specificity, MCC, F1_score, roc_auc_val, auc_val, Q9, ppv, npv, tp, fp, tn, fn = tester.test(dataset_test)
File "/Users/demainchen/Downloads/Struct2Graph-master/k-fold-CV.py", line 202, in test
roc_auc_val = roc_auc_score(t_list, score_list)
File "/Users/demainchen/.conda/envs/DESC_MOL-DDIE-master/lib/python3.9/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/Users/demainchen/.conda/envs/DESC_MOL-DDIE-master/lib/python3.9/site-packages/sklearn/metrics/_ranking.py", line 542, in roc_auc_score
return _average_binary_score(partial(_binary_roc_auc_score,
File "/Users/demainchen/.conda/envs/DESC_MOL-DDIE-master/lib/python3.9/site-packages/sklearn/metrics/_base.py", line 77, in _average_binary_score
return binary_metric(y_true, y_score, sample_weight=sample_weight)
File "/Users/demainchen/.conda/envs/DESC_MOL-DDIE-master/lib/python3.9/site-packages/sklearn/metrics/_ranking.py", line 327, in _binary_roc_auc_score
raise ValueError("Only one class present in y_true. ROC AUC score "
ValueError: Only one class present in y_true. ROC AUC score is not defined in that case.
When I try to run the K-fold-CV.py , the console told me the above information.
Training...
/Users/demainchen/Downloads/Struct2Graph-master/k-fold-CV.py:282: RuntimeWarning: invalid value encountered in double_scalars
MCC = float(tptn-fpfn)/(np.sqrt((tp+fp)(tp+fn)(tn+fp)*(tn+fn)))
Traceback (most recent call last):
File "", line 1, in
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 198, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/Users/demainchen/Downloads/Struct2Graph-master/k-fold-CV.py", line 388, in
accuracy, precision, recall, sensitivity, specificity, MCC, F1_score, roc_auc_val, auc_val, Q9, ppv, npv, tp, fp, tn, fn = tester.test(dataset_test)
File "/Users/demainchen/Downloads/Struct2Graph-master/k-fold-CV.py", line 202, in test
roc_auc_val = roc_auc_score(t_list, score_list)
File "/Users/demainchen/.conda/envs/DESC_MOL-DDIE-master/lib/python3.9/site-packages/sklearn/utils/validation.py", line 63, in inner_f
return f(*args, **kwargs)
File "/Users/demainchen/.conda/envs/DESC_MOL-DDIE-master/lib/python3.9/site-packages/sklearn/metrics/_ranking.py", line 542, in roc_auc_score
return _average_binary_score(partial(_binary_roc_auc_score,
File "/Users/demainchen/.conda/envs/DESC_MOL-DDIE-master/lib/python3.9/site-packages/sklearn/metrics/_base.py", line 77, in _average_binary_score
return binary_metric(y_true, y_score, sample_weight=sample_weight)
File "/Users/demainchen/.conda/envs/DESC_MOL-DDIE-master/lib/python3.9/site-packages/sklearn/metrics/_ranking.py", line 327, in _binary_roc_auc_score
raise ValueError("Only one class present in y_true. ROC AUC score "
ValueError: Only one class present in y_true. ROC AUC score is not defined in that case.
When I try to run the K-fold-CV.py , the console told me the above information.