如何使用筛选方法创建流水线,以选择相关度高于值的结果(特征)?

问题描述 投票:1回答:1

我想如下实现hybrid methodfeature selection

  1. [filter methodUnivariate feature selection,使用correlation),所有相关性高于X值的特征都将传递到下一步:
  2. filter methodMultivariate filter methods,使用correlation),所有相关性低于Y值的特征都将传递到下一步:

  3. wrapper method

我想用pipeline方法来做。

对于过滤器方法,似乎sklearn没有提供选择高于或低于阈值的特征的选项。

([SelectKBestSelectPercentile选择K个最佳功能,但我想根据thresholds选择功能。

sklearn可以吗?怎么样?

或者我该如何使用管道?

machine-learning scikit-learn pipeline feature-selection
1个回答
0
投票
SelectKBest方法具有名为scores_的属性,该属性返回要素得分。因此,您可以手动检查分数并对其进行过滤。
© www.soinside.com 2019 - 2024. All rights reserved.