code: def predict(
      self,
      df,
      decompose=False,
      store_prediction_array=False,
      seed=None,
      **kwargs,
  ) -> pd.DataFrame:
      # raise if model is not fitted
      if not self.is_fitted():
          raise ForecasterException("Model is not fitted yet.")
      # obtain basic meta data from input df
      self._set_prediction_meta(df)
      prediction_meta = self.get_prediction_meta()
      training_meta = self.get_training_meta()
  
      if seed is not None:
          np.random.seed(seed)
  
      if self._point_method is None:
          # full posteriors prediction
          # if bootstrap draws, replace posterior samples with bootstrap
          posterior_samples = (
              self._bootstrap(
                  num_samples=self.estimator.num_sample,
                  posterior_samples=self._posterior_samples,
                  n=self._n_bootstrap_draws,
              )
              if self._n_bootstrap_draws > 1
              else self._posterior_samples
          )
  
          predicted_dict = self._model.predict(
              posterior_estimates=posterior_samples,
              df=df,
              training_meta=training_meta,
              prediction_meta=prediction_meta,
              include_error=True,
              **kwargs,
          )
  
          if (
              PredictionKeys.PREDICTION.value
              not in predicted_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:
              predicted_dict = {
                  k: v
                  for k, v in predicted_dict.items()
                  if k == PredictionKeys.PREDICTION.value
              }
  
          if store_prediction_array:
              self.prediction_array = predicted_dict[
                  PredictionKeys.PREDICTION.value
              ]
          percentiles_dict = compute_percentiles(
              predicted_dict, self._prediction_percentiles
          )
          predicted_df = pd.DataFrame(percentiles_dict)
          predicted_df = prepend_date_column(
              predicted_df, df, self.date_col
          )
          return predicted_df
      else:
          # perform point prediction
          point_posteriors = self._point_posteriors.get(
              self._point_method
          )
          point_predicted_dict = self._model.predict(
              posterior_estimates=point_posteriors,
              df=df,
              training_meta=training_meta,
              prediction_meta=prediction_meta,
              include_error=False,
              **kwargs,
          )
          for k, v in point_predicted_dict.items():
              point_predicted_dict[k] = np.squeeze(v, 0)
  
          # to derive confidence interval; the condition should be sufficient since we add [50] by default
          if (
              self._n_bootstrap_draws > 0
              and len(self._prediction_percentiles) > 1
          ):
              # perform bootstrap; we don't have posterior samples. hence, we just repeat the draw here.
              posterior_samples = {}
              for k, v in point_posteriors.items():
                  posterior_samples[k] = np.repeat(
                      v, self.n_bootstrap_draws, axis=0
                  )
              predicted_dict = self._model.predict(
                  posterior_estimates=posterior_samples,
                  df=df,
                  training_meta=training_meta,
                  prediction_meta=prediction_meta,
                  include_error=True,
                  **kwargs,
              )
              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
  
file_path: orbit/orbit/forecaster/full_bayes.py
imports: import numpy
  import pandas
  from functools import partial
  from ..constants.constants import PredictMethod, PredictionKeys
  from ..exceptions import ForecasterException
  from ..utils.predictions import prepend_date_column, compute_percentiles
  from .forecaster import Forecaster
label_desc: Use image node_id 5 for calling the FullBayesianForecaster obj's underlying member method code with example usage: obj.predict(df, decompose, store_prediction_array, seed) and returns: predicted_df, predicted_df