此内容在sklearn官网地址: http://scikit-learn.org/stable/modules/feature_selection.html
sklearn版本:0.18.2
sklearn.feature_selection
The module can be used for feature selection/dimensionality reduction on sample sets, either to improve estimators’ accuracy scores or to boost their performance on very high-dimensional datasets.
用于特征选择/降维,可提高精度和性能。
特征选择有很多种方式,下面讲第一种:通过SelectFromModel选择。
sklearn.feature_selection.SelectFromModel
SelectFromModel is a meta-transformer that can be used along with any estimator that has a coef_ or feature_importances_ attribute after fitting. The features are consi
Sklearn中的特征选择:SelectFromModel详解

本文介绍了Sklearn库中的feature_selection模块,特别是SelectFromModel类在特征选择中的应用。SelectFromModel可以与具有coef_或feature_importances_属性的估计器一起使用,通过设定阈值来去除不重要的特征。它支持L1-based和Tree-based特征选择,如Lasso回归和决策树等,用于降低维度并提升模型性能。
最低0.47元/天 解锁文章
3186





