How can I use a custom feature selection function in scikit-learn's `pipeline`

后端 未结 5 1905
闹比i
闹比i 2021-01-30 18:47

Let\'s say that I want to compare different dimensionality reduction approaches for a particular (supervised) dataset that consists of n>2 features via cross-validation and by u

5条回答
  •  醉梦人生
    2021-01-30 19:42

    Adding on Sebastian Raschka's and eickenberg's answers, the requirements a transformer object should hold are specified in scikit-learn's documentation.

    There are several more requirements than just having fit and transform, if you want the estimator to usable in parameter estimation, such as implementing set_params.

提交回复
热议问题