'Transform data back to its original space.
In other words, return an input X_original whose transform would be X.
Parameters
X : array-like, shape (n_samples, n_components)
New data, where n_samples is 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 will compute the
exact inverse operation, which includes reversing whitening.'

def inverse_transform(self, X):

    if self.whiten:
        return (np.dot(X, (np.sqrt(self.explained_variance_[:, np.newaxis]) * self.components_)) + self.mean_)
    else:
        return (np.dot(X, self.components_) + self.mean_)
