未定义的meterricwarning。我无法得到答案
在我的代码中,我通过编写以下命令来计算我的多标签数据集的F1得分:
f1_score_results.append(f1_score(y_train[col], y_pred_train[col_idx], average='macro'))
此代码为我提供了输出,但错误也会出现。
我还写了以下代码,
print(len(np.unique(X_train)))
print(len(np.unique(X_test)))
print(len(np.unique(y_train)))
print(len(np.unique(y_test)))
即im fer IS的输出是:
请帮助我如何解决此问题。
In my code i'm calculating f1-score for my multi-labelled dataset by writing the following command:
f1_score_results.append(f1_score(y_train[col], y_pred_train[col_idx], average='macro'))
This code is giving me the output but error is also coming which is given below.
I also wrote the following code
print(len(np.unique(X_train)))
print(len(np.unique(X_test)))
print(len(np.unique(y_train)))
print(len(np.unique(y_test)))
The output that i m getting is :
Kindly help me how I can resolve this issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发生错误,因为您缺乏测试数据。因此,警告说,我没有足够的测试数据。因此,我不能给您F-Score,所以我只能放置0.0个价值,因为我也没有任何campare。
您应该做的是尝试增加Y__TRAIN和Y__TEST数据集大小。可能施加更少的条件
The error happens, because you have a lack of testing data. Therefore the warning, saying hey i dont have enough test data. So i cant give you the f-score, so i am just gonna put a 0.0 value since i dont have anything to campare too.
What you should do is try to increase, your y_train and y_test dataset size. Maybe imposing less conditions on then