'Fit the SelectFromModel meta-transformer.
Parameters
X : array-like of shape (n_samples, n_features)
The training input samples.
y : array-like, shape (n_samples,)
The target values (integers that correspond to classes in
classification, real numbers in regression).
**fit_params : Other estimator specific parameters
Returns
self : object
Returns self.'

def fit(self, X, y=None, **fit_params):

    if self.prefit:
        raise NotFittedError("Since    'prefit=True',    call    transform    directly")
    self.estimator_ = clone(self.estimator)
    self.estimator_.fit(X, y, **fit_params)
    return self
