使用Scikit随机森林分类器。我试图预测一个双星目标,并得到概率。在
from sklearn.ensemble import RandomForestClassifier
X_train, X_test, y_train, y_test = train_test_split(df, y, test_size=0.25, random_state=42)
rf = RandomForestClassifier(n_estimators=100, random_state=42,class_weight=None, max_features="auto",
bootstrap="False", criterion='entropy')
rf.fit(X_train, y_train)
preds = rf.predict_proba(X_test)
如你所见,0.4的垃圾箱有点奇怪。我可以理解短暂的波动,但这是下降到那个垃圾桶的数量急剧减少。 考虑到测试装置在10M左右
^{pr2}$Python Random Forest怎么能在prob分布中造成这样的漏洞?对此有什么建议或想法吗?在
目前没有回答
相关问题 更多 >
编程相关推荐