def apply(self, dataset, can_fit=False):
        # Compiles apply.x_minus_mean_times_p(), a numeric Theano function that
        # evauates dot(X - mean, P)
        if not hasattr(ZCA, '_x_minus_mean_times_p'):
            x_symbol = tensor.matrix('X')
            mean_symbol = tensor.vector('mean')
            p_symbol = tensor.matrix('P_')
            new_x_symbol = tensor.dot(x_symbol - mean_symbol, p_symbol)
            ZCA._x_minus_mean_times_p = theano.function([x_symbol,
                                                         mean_symbol,
                                                         p_symbol],
                                                        new_x_symbol)

        X = dataset.get_design_matrix()
        assert X.dtype in ['float32', 'float64']
        if not self.has_fit_:
            assert can_fit
            self.fit(X)

        new_X = ZCA._gpu_matrix_dot(X - self.mean_, self.P_)
        dataset.set_design_matrix(new_X)
.. todo::
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/datasets/preprocessing.py/ZCA.apply