'Apply the dimension reduction learned on the train data.
Parameters
X : array-like, shape = [n_samples, n_features]
Training vectors, where n_samples is the number of samples and
n_features is the number of predictors.
copy : boolean, default True
Whether to copy X and Y, or perform in-place normalization.
Notes
This call requires the estimation of a p x q matrix, which may
be an issue in high dimensional space.'

def predict(self, X, copy=True):

    check_is_fitted(self, 'x_mean_')
    X = check_array(X, copy=copy, dtype=FLOAT_DTYPES)
    X -= self.x_mean_
    X /= self.x_std_
    Ypred = np.dot(X, self.coef_)
    return (Ypred + self.y_mean_)
