orbit/forecaster/map.py [83:129]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            percentiles_dict = compute_percentiles(
                predicted_dict, self._prediction_percentiles
            )
            # replace mid point prediction by point estimate
            percentiles_dict.update(point_predicted_dict)

            if PredictionKeys.PREDICTION.value not in percentiles_dict.keys():
                raise ForecasterException(
                    "cannot find the key:'{}' from return of _predict()".format(
                        PredictionKeys.PREDICTION.value
                    )
                )

            # since we always assume to have decompose from .predict() at first,
            # here it reduces to prediction when decompose is not requested
            if not decompose:
                k = PredictionKeys.PREDICTION.value
                reduced_keys = [
                    k + "_" + str(p) if p != 50 else k
                    for p in self._prediction_percentiles
                ]
                percentiles_dict = {
                    k: v for k, v in percentiles_dict.items() if k in reduced_keys
                }
            predicted_df = pd.DataFrame(percentiles_dict)
        else:
            if not decompose:
                # reduce to prediction only if decompose is not requested
                point_predicted_dict = {
                    k: v
                    for k, v in point_predicted_dict.items()
                    if k == PredictionKeys.PREDICTION.value
                }
            predicted_df = pd.DataFrame(point_predicted_dict)

        predicted_df = prepend_date_column(predicted_df, df, self.date_col)
        return predicted_df

    # TODO: should be private
    def load_extra_methods(self):
        for method in self.extra_methods:
            setattr(
                self,
                method,
                partial(
                    getattr(self._model, method),
                    self.get_training_meta(),
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



orbit/forecaster/svi.py [176:220]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                percentiles_dict = compute_percentiles(
                    predicted_dict, self._prediction_percentiles
                )
                # replace mid point prediction by point estimate
                percentiles_dict.update(point_predicted_dict)

                if PredictionKeys.PREDICTION.value not in percentiles_dict.keys():
                    raise ForecasterException(
                        "cannot find the key:'{}' from return of _predict()".format(
                            PredictionKeys.PREDICTION.value
                        )
                    )

                # reduce to prediction only if decompose is not requested
                if not decompose:
                    k = PredictionKeys.PREDICTION.value
                    reduced_keys = [
                        k + "_" + str(p) if p != 50 else k
                        for p in self._prediction_percentiles
                    ]
                    percentiles_dict = {
                        k: v for k, v in percentiles_dict.items() if k in reduced_keys
                    }
                predicted_df = pd.DataFrame(percentiles_dict)
            else:
                if not decompose:
                    # reduce to prediction only if decompose is not requested
                    point_predicted_dict = {
                        k: v
                        for k, v in point_predicted_dict.items()
                        if k == PredictionKeys.PREDICTION.value
                    }
                predicted_df = pd.DataFrame(point_predicted_dict)

            predicted_df = prepend_date_column(predicted_df, df, self.date_col)
            return predicted_df

    def load_extra_methods(self):
        for method in self.extra_methods:
            setattr(
                self,
                method,
                partial(
                    getattr(self._model, method),
                    self.get_training_meta(),
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



