'Transform data back to its original space.
Returns an array X_original whose transform would be X.
Parameters
X : array-like, shape (n_samples, n_components)
New data, where n_samples in the number of samples
and n_components is the number of components.
Returns
X_original array-like, shape (n_samples, n_features)
Notes
If whitening is enabled, inverse_transform does not compute the
exact inverse operation of transform.'

def inverse_transform(self, X):

    check_is_fitted(self, 'mean_')
    X_original = np.dot(X, self.components_)
    if (self.mean_ is not None):
        X_original = (X_original + self.mean_)
    return X_original
