def from_yaml(cls, yaml_str=None, str_or_buffer=None):
        """
        Create a RegressionModel instance from a saved YAML configuration.
        Arguments are mutually exclusive.

        Parameters
        ----------
        yaml_str : str, optional
            A YAML string from which to load model.
        str_or_buffer : str or file like, optional
            File name or buffer from which to load YAML.

        Returns
        -------
        RegressionModel

        """
        cfg = yamlio.yaml_to_dict(yaml_str, str_or_buffer)

        model = cls(
            cfg['fit_filters'],
            cfg['predict_filters'],
            cfg['model_expression'],
            YTRANSFORM_MAPPING[cfg['ytransform']],
            cfg['name'])

        if 'fitted' in cfg and cfg['fitted']:
            fit_parameters = pd.DataFrame(cfg['fit_parameters'])
            fit_parameters.rsquared = cfg['fit_rsquared']
            fit_parameters.rsquared_adj = cfg['fit_rsquared_adj']

            model.model_fit = _FakeRegressionResults(
                model.str_model_expression,
                fit_parameters,
                cfg['fit_rsquared'], cfg['fit_rsquared_adj'])
            model.fit_parameters = fit_parameters

        logger.debug('loaded regression model {} from YAML'.format(model.name))
        return model
Create a RegressionModel instance from a saved YAML configuration.
        Arguments are mutually exclusive.

        Parameters
        ----------
        yaml_str : str, optional
            A YAML string from which to load model.
        str_or_buffer : str or file like, optional
            File name or buffer from which to load YAML.

        Returns
        -------
        RegressionModel