我想在模型机学习的输出中获得两个以上的目标
我想在用文本的分类模型预测中获得两个类。
model_RandomForest = RandomForestClassifier(n_estimators=100,criterion='gini', random_state=0)
如果我可以添加数字输出的参数
I want to get two classes in the prediction of the classification model with text.
model_RandomForest = RandomForestClassifier(n_estimators=100,criterion='gini', random_state=0)
if I can add a parameter of number output
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您有多标签样本,则只需要将类标签定义为2D numpy数组即可。
示例:
预测多级标签:
在
sklearn
中,这被称为多标签 - 辅助
。If you have multi-label samples, you just need to define the class labels as a 2d numpy array.
Example:
Predict the multi-class labels:
In
sklearn
, this is known asmultilabel-indicator
.