我想如下实现hybrid method
的feature selection
:
filter method
(Univariate feature selection
,使用correlation
),所有相关性高于X值的特征都将传递到下一步:filter method
(Multivariate filter methods
,使用correlation
),所有相关性低于Y值的特征都将传递到下一步:
wrapper method
我想用pipeline
方法来做。
对于过滤器方法,似乎sklearn
没有提供选择高于或低于阈值的特征的选项。
([SelectKBest
或SelectPercentile
选择K个最佳功能,但我想根据thresholds
选择功能。
sklearn
可以吗?怎么样?
或者我该如何使用管道?
scores_
的属性,该属性返回要素得分。因此,您可以手动检查分数并对其进行过滤。