(self, data, debug=False)
Fit each of the models in the group.

        Parameters
        ----------
        data : pandas.DataFrame
            Must have a column with the same name as `segmentation_col`.
        debug : bool
            If set to true (default false) will pass the debug parameter
            to model estimation.

        Returns
        -------
        fits : dict of statsmodels.regression.linear_model.OLSResults
            Keys are the segment names.
Fit each of the models in the group.
Fit each of the models in the group .
def fit(self, data, debug=False):
        """
        Fit each of the models in the group.

        Parameters
        ----------
        data : pandas.DataFrame
            Must have a column with the same name as `segmentation_col`.
        debug : bool
            If set to true (default false) will pass the debug parameter
            to model estimation.

        Returns
        -------
        fits : dict of statsmodels.regression.linear_model.OLSResults
            Keys are the segment names.

        """
        with log_start_finish(
                'fitting models in group {}'.format(self.name), logger):
            return {name: self.models[name].fit(df, debug=debug)
                    for name, df in self._iter_groups(data)}
def fit ( self , data , debug = False ) : with log_start_finish ( 'fitting models in group {}' . format ( self . name ) , logger ) : return { name : self . models [ name ] . fit ( df , debug = debug ) for name , df in self . _iter_groups ( data ) }