Open ngragaei opened 4 years ago
one solution is to convert the contents of the floating point arrays to integer values
fpr[i], tpr[i], _ = roc_curve(np.rint(Y_test[:, i]), np.rint(y_scores[:, i]))
auc_score = roc_auc_score(np.rint(Y_test), np.rint(y_scores))
Traceback (most recent call last):
File "eval_network.py", line 135, in
one solution is to convert the contents of the floating point arrays to integer values
fpr[i], tpr[i], _ = roc_curve(np.rint(Y_test[:, i]), np.rint(y_scores[:, i]))
auc_score = roc_auc_score(np.rint(Y_test), np.rint(y_scores))
Solved!
File "D:/Anaconda3/Lib/site-packages/panotti-master/eval_network.py", line 141, in
eval_network(weights_file=args.weights, classpath=args.classpath, batch_size=args.batch_size)
File "D:/Anaconda3/Lib/site-packages/panotti-master/eval_network.py", line 91, in evalnetwork fpr[i], tpr[i], = roc_curve(Y_test[:, i], y_scores[:, i])
File "D:\Anaconda3\lib\site-packages\sklearn\metrics\ranking.py", line 622, in roc_curve y_true, y_score, pos_label=pos_label, sample_weight=sample_weight)
File "D:\Anaconda3\lib\site-packages\sklearn\metrics\ranking.py", line 396, in _binary_clf_curve raise ValueError("{0} format is not supported".format(y_type))
ValueError: continuous format is not supported