我想计算我的 LSTM 模型的混淆矩阵。
y_test= (17799,1)
y_Pred= (17799,1)的形状
我使用了以下代码:
from sklearn.metrics import chaos_matrix
cm = chaos_matrix(y_test, y_pred)
出现以下错误:
raise ValueError("{0} is not supported" .format(y_type))
ValueError: Continuous is not supported
both y_test and y_predict are normalized using minmaxscaler(0,1)
两个变量的前几行如下所示:
y_test={0,0,0,0.0216212}
y_predict={0.000433061,0.000433061,0.000433061,0.000450924}
请建议如何计算混淆矩阵 tp,fp,tn,fn 。