@classmethod
    def fit_from_cfg(cls, choosers, chosen_fname, alternatives, cfgname):
        logger.debug('start: fit from configuration {}'.format(cfgname))
        lcm = cls.from_yaml(str_or_buffer=cfgname)
        lcm.fit(choosers, alternatives, choosers[chosen_fname])
        lcm.report_fit()
        lcm.to_yaml(str_or_buffer=cfgname)
        logger.debug('finish: fit from configuration {}'.format(cfgname))
        return lcm
:see Expression._set_type()
dataset/ETHPy150Open UDST/urbansim/urbansim/models/dcm.py/MNLDiscreteChoiceModel.fit_from_cfg--crossover with--dataset/ETHPy150Open nltk/nltk/nltk/sem/logic.py/IndividualVariableExpression._set_type