'Fit the model using X, y as training data.
Parameters
X : array-like, shape=(n_samples,)
Training data.
y : array-like, shape=(n_samples,)
Training target.
sample_weight : array-like, shape=(n_samples,), optional, default: None
Weights. If set to None, all weights will be set to 1 (equal
weights).
Returns
self : object
Returns an instance of self.
Notes
X is stored for future use, as `transform` needs X to interpolate
new input data.'

def fit(self, X, y, sample_weight=None):

    (X, y) = self._build_y(X, y, sample_weight)
    (self._necessary_X_, self._necessary_y_) = (X, y)
    self._build_f(X, y)
    return self
