def test_RFECV():
'''
test the method of RFECV
:return: None
'''
iris=load_iris()
X=iris.data
y=iris.target
estimator=LinearSVC()
selector=RFECV(estimator=estimator,cv=3)
selector.fit(X,y)
print("N_features %s"%selector.n_features_)
print("Support is %s"%selector.support_)
print("Ranking %s"%selector.ranking_)
print("Grid Scores %s"%selector.grid_scores_)
11.6 feature_selection_bagging.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录