'Run score function on (X, y) and get the appropriate features.
Parameters
X : array-like, shape = [n_samples, n_features]
The training input samples.
y : array-like, shape = [n_samples]
The target values (class labels in classification, real numbers in
regression).
Returns
self : object
Returns self.'

def fit(self, X, y):

    (X, y) = check_X_y(X, y, ['csr', 'csc'], multi_output=True)
    if (not callable(self.score_func)):
        raise TypeError(('The    score    function    should    be    a    callable,    %s    (%s)    was    passed.' % (self.score_func, type(self.score_func))))
    self._check_params(X, y)
    score_func_ret = self.score_func(X, y)
    if isinstance(score_func_ret, (list, tuple)):
        (self.scores_, self.pvalues_) = score_func_ret
        self.pvalues_ = np.asarray(self.pvalues_)
    else:
        self.scores_ = score_func_ret
        self.pvalues_ = None
    self.scores_ = np.asarray(self.scores_)
    return self
