'Fit to data, then transform it.
Fits transformer to X and y with optional parameters fit_params
and returns a transformed version of X.
Parameters
X : numpy array of shape [n_samples, n_features]
Training set.
y : numpy array of shape [n_samples]
Target values.
Returns
X_new : numpy array of shape [n_samples, n_features_new]
Transformed array.'

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

    if (y is None):
        return self.fit(X, **fit_params).transform(X)
    else:
        return self.fit(X, y, **fit_params).transform(X)
