@classmethod
    def fit_from_cfg(cls, df, cfgname, debug=False, min_segment_size=None):
        """
        Parameters
        ----------
        df : DataFrame
            The dataframe which contains the columns to use for the estimation.
        cfgname : string
            The name of the yaml config file which describes the hedonic model.
        debug : boolean, optional (default False)
            Whether to generate debug information on the model.
        min_segment_size : int, optional
            Set attribute on the model.

        Returns
        -------
        hm : SegmentedRegressionModel which was used to fit
        """
        logger.debug('start: fit from configuration {}'.format(cfgname))
        hm = cls.from_yaml(str_or_buffer=cfgname)
        if min_segment_size:
            hm.min_segment_size = min_segment_size

        for k, v in hm.fit(df, debug=debug).items():
            print(str(k) % "REGRESSION RESULTS FOR SEGMENT %s\n")
            print(v.summary())
        hm.to_yaml(str_or_buffer=cfgname)
        logger.debug('finish: fit from configuration {}'.format(cfgname))
        return hm
dataset/ETHPy150Open UDST/urbansim/urbansim/models/regression.py/SegmentedRegressionModel.fit_from_cfg/swapped operands of `%`