【发布时间】:2020-08-08 15:51:21
【问题描述】:
目前,我正在研究随机森林进行分类。我在显示模型中使用的功能时遇到问题。
这是我的一些代码
model=RandomForestClassifier(n_estimators=estimator, max_depth=depth, max_features=feature)# a simple random forest model
model.fit(train_X,train_y)# now fit our model for training data
prediction=model.predict(test_X)
我使用超参数作为模型参数,尤其是 max_features。输入可以是 3、5 和无(使用所有功能)。
这是我的特点:
A1_feat A2_feat A3_feat A4_feat A5_feat A6_feat A7_feat A8_feat B_feat C_feat
类或标签的状态
例如,我使用了 5 个功能。那么我想知道正在使用哪些功能?
输出应该是A1_feat, A3_feat, A5_feat, B_feat, and C_feat
【问题讨论】:
标签: machine-learning random-forest feature-extraction feature-detection