Perform MVARICA

        Perform MVARICA source decomposition and VAR model fitting.

        Parameters
        ----------
        varfit : string
            Determines how to calculate the residuals for source decomposition.
            'ensemble' (default) fits one model to the whole data set,
            'class' fits a different model for each class, and
            'trial' fits a different model for each individual trial.

        Returns
        -------
        self : Workspace
            The Workspace object.

        Raises
        ------
        RuntimeError
            If the :class:`Workspace` instance does not contain data.

        See Also
        --------
        :func:`mvarica` : MVARICA implementation

def do_mvarica(self, varfit='ensemble', random_state=None):
        """ Perform MVARICA

        Perform MVARICA source decomposition and VAR model fitting.

        Parameters
        ----------
        varfit : string
            Determines how to calculate the residuals for source decomposition.
            'ensemble' (default) fits one model to the whole data set,
            'class' fits a different model for each class, and
            'trial' fits a different model for each individual trial.

        Returns
        -------
        self : Workspace
            The Workspace object.

        Raises
        ------
        RuntimeError
            If the :class:`Workspace` instance does not contain data.

        See Also
        --------
        :func:`mvarica` : MVARICA implementation
        """
        if self.data_ is None:
            raise RuntimeError("MVARICA requires data to be set")
        result = mvarica(x=self.data_[self.trial_mask_, :, :],
                         cl=self.cl_[self.trial_mask_], var=self.var_,
                         reducedim=self.reducedim_, backend=self.backend_,
                         varfit=varfit, random_state=random_state)
        self.mixing_ = result.mixing
        self.unmixing_ = result.unmixing
        self.var_ = result.b
        self.connectivity_ = Connectivity(result.b.coef, result.b.rescov,
                                          self.nfft_)
        self.activations_ = dot_special(self.unmixing_.T, self.data_)
        self.mixmaps_ = []
        self.unmixmaps_ = []
        return self