728x90 ML & DL/Machine Learning1 scikit learn pipeline 1.13.6. Feature selection as part of a pipeline Feature selection is usually used as a pre-processing step before doing the actual learning. The recommended way to do this in scikit-learn is to use a Pipeline: clf = Pipeline([ ('feature_selection', SelectFromModel(LinearSVC(penalty="l1"))), ('classification', RandomForestClassifier()) ]) clf.fit(X, y) clf = Pipeline([ ('feature_selection', Selec.. ML & DL/Machine Learning 2021. 2. 2. 이전 1 다음 728x90