'Remove selected components from the signal.
Given the unmixing matrix, transform data, zero out components,
and inverse transform the data. This procedure will reconstruct
the signals from which the dynamics described by the excluded
components is subtracted.
Parameters
X : array, shape (n_epochs, n_components * n_classes, n_times)
The transformed data.
Returns
X : array, shape (n_epochs, n_channels * n_classes, n_times)
The inverse transform data.'

def inverse_transform(self, X):

    (X, _) = self._check_Xy(X)
    (n_components, n_channels) = self.patterns_.shape
    (n_epochs, n_comp, n_times) = X.shape
    if (n_comp != (self.n_components * len(self.classes_))):
        raise ValueError(('X    must    have    %i    components,    got    %i    instead' % ((self.n_components * len(self.classes_)), n_comp)))
    return np.dot(self.patterns_.T, X).transpose(1, 0, 2)
