def fit(self, choosers, alternatives, current_choice):
        logger.debug('start: fit models in segmented LCM {}'.format(self.name))

        choosers, alternatives = self.apply_fit_filters(choosers, alternatives)
        unique = choosers[self.segmentation_col].unique()

        # Remove any existing segments that may no longer have counterparts
        # in the data. This can happen when loading a saved model and then
        # calling this method with data that no longer has segments that
        # were there the last time this was called.
        gone = set(self._group.models) - set(unique)
        for g in gone:
            del self._group.models[g]

        for x in unique:
            if x not in self._group.models:
                self.add_segment(x)

        results = self._group.fit(choosers, alternatives, current_choice)
        logger.debug(
            'finish: fit models in segmented LCM {}'.format(self.name))
        return results
Parameters
dataset/ETHPy150Open UDST/urbansim/urbansim/models/dcm.py/SegmentedMNLDiscreteChoiceModel.fit--crossover with--dataset/ETHPy150Open scikit-beam/scikit-beam/skbeam/core/fitting/xrf_model.py/ModelSpectrum.model_fit