File size: 337 Bytes
52dbbac |
1 2 3 4 5 6 7 8 9 10 11 12 |
from sklearn.base import BaseEstimator, TransformerMixin
class FeatureSelection(BaseEstimator, TransformerMixin):
def __init__(self,selected_features):
self.selected_features=selected_features
def fit(self,X,y=None):
return self
def transform(self, X, y=None):
return X[self.selected_features] |