def summed_probabilities(self, choosers, alternatives):
        def normalize(s):
            return s / s.sum()

        choosers, alternatives = self.apply_predict_filters(
            choosers, alternatives)
        probs = self.probabilities(choosers, alternatives, filter_tables=False)

        # groupby the the alternatives ID and sum
        if self.probability_mode == 'single_chooser':
            return (
                normalize(probs) * len(choosers)
                ).reset_index(level=0, drop=True)
        elif self.probability_mode == 'full_product':
            return probs.groupby(level=0).apply(normalize)\
                .groupby(level=1).sum()
        else:
            raise ValueError(
                'Unrecognized probability_mode option: {}'.format(
                    self.probability_mode))
Calculate total probability associated with each alternative.
dataset/ETHPy150Open UDST/urbansim/urbansim/models/dcm.py/MNLDiscreteChoiceModel.summed_probabilities