class_docstr: Base adapter class for StatsForecast models.
class_docstr_tok: ["Base","adapter","class","for","StatsForecast","models","."]
docstr: Compute/return prediction quantiles for a forecast.
  
  private _predict_interval containing the core logic,
      called from predict_interval and possibly predict_quantiles
  
  State required:
      Requires state to be "fitted".
  
  Accesses in self:
      Fitted model attributes ending in "_"
      self.cutoff
  
  Parameters
  ----------
  fh : guaranteed to be ForecastingHorizon
      The forecasting horizon with the steps ahead to to predict.
  X :  sktime time series object, optional (default=None)
      guaranteed to be of an mtype in self.get_tag("X_inner_mtype")
      Exogeneous time series for the forecast
  coverage : list of float (guaranteed not None and floats in [0,1] interval)
     nominal coverage(s) of predictive interval(s)
  
  Returns
  -------
  pred_int : pd.DataFrame
      Column has multi-index: first level is variable name from y in fit,
          second level coverage fractions for which intervals were computed.
              in the same order as in input `coverage`.
          Third level is string "lower" or "upper", for lower/upper interval end.
      Row index is fh, with additional (upper) levels equal to instance levels,
          from y seen in fit, if y_inner_mtype is Panel or Hierarchical.
      Entries are forecasts of lower/upper interval end,
          for var in col index, at nominal coverage in second col index,
          lower/upper depending on third col index, for the row index.
          Upper/lower interval end forecasts are equivalent to
          quantile forecasts at alpha = 0.5 - c/2, 0.5 + c/2 for c in coverage.
docstr_tok: ["Compute\/return","prediction","quantiles","for","a","forecast",".","private","_predict_interval","containing","the","core","logic",",","called","from","predict_interval","and","possibly","predict_quantiles","State","required",":","Requires","state","to","be","``","fitted","''",".","Accesses","in","self",":","Fitted","model","attributes","ending","in","``","_","''","self.cutoff","Parameters","--","--","--","--","--","fh",":","guaranteed","to","be","ForecastingHorizon","The","forecasting","horizon","with","the","steps","ahead","to","to","predict",".","X",":","sktime","time","series","object",",","optional","(","default=None",")","guaranteed","to","be","of","an","mtype","in","self.get_tag","(","``","X_inner_mtype","''",")","Exogeneous","time","series","for","the","forecast","coverage",":","list","of","float","(","guaranteed","not","None","and","floats","in","[","0,1","]","interval",")","nominal","coverage","(","s",")","of","predictive","interval","(","s",")","Returns","--","--","--","-","pred_int",":","pd.DataFrame","Column","has","multi-index",":","first","level","is","variable","name","from","y","in","fit",",","second","level","coverage","fractions","for","which","intervals","were","computed",".","in","the","same","order","as","in","input","`","coverage","`",".","Third","level","is","string","``","lower","''","or","``","upper","''",",","for","lower\/upper","interval","end",".","Row","index","is","fh",",","with","additional","(","upper",")","levels","equal","to","instance","levels",",","from","y","seen","in","fit",",","if","y_inner_mtype","is","Panel","or","Hierarchical",".","Entries","are","forecasts","of","lower\/upper","interval","end",",","for","var","in","col","index",",","at","nominal","coverage","in","second","col","index",",","lower\/upper","depending","on","third","col","index",",","for","the","row","index",".","Upper\/lower","interval","end","forecasts","are","equivalent","to","quantile","forecasts","at","alpha","=","0.5","-","c\/2",",","0.5","+","c\/2","for","c","in","coverage","."]
code: def _predict_interval(self, fh, X, coverage):
      """Compute/return prediction quantiles for a forecast.
  
      private _predict_interval containing the core logic,
          called from predict_interval and possibly predict_quantiles
  
      State required:
          Requires state to be "fitted".
  
      Accesses in self:
          Fitted model attributes ending in "_"
          self.cutoff
  
      Parameters
      ----------
      fh : guaranteed to be ForecastingHorizon
          The forecasting horizon with the steps ahead to to predict.
      X :  sktime time series object, optional (default=None)
          guaranteed to be of an mtype in self.get_tag("X_inner_mtype")
          Exogeneous time series for the forecast
      coverage : list of float (guaranteed not None and floats in [0,1] interval)
         nominal coverage(s) of predictive interval(s)
  
      Returns
      -------
      pred_int : pd.DataFrame
          Column has multi-index: first level is variable name from y in fit,
              second level coverage fractions for which intervals were computed.
                  in the same order as in input `coverage`.
              Third level is string "lower" or "upper", for lower/upper interval end.
          Row index is fh, with additional (upper) levels equal to instance levels,
              from y seen in fit, if y_inner_mtype is Panel or Hierarchical.
          Entries are forecasts of lower/upper interval end,
              for var in col index, at nominal coverage in second col index,
              lower/upper depending on third col index, for the row index.
              Upper/lower interval end forecasts are equivalent to
              quantile forecasts at alpha = 0.5 - c/2, 0.5 + c/2 for c in coverage.
      """
      X_predict_input = X if X is None else X.to_numpy(copy=False)
  
      in_sample_horizon, out_of_sample_horizon = self._split_horizon(fh)
  
      interval_predictions = []
  
      if in_sample_horizon:
          in_sample_interval_predictions = (
              self._predict_in_or_out_of_sample(
                  in_sample_horizon,
                  "in-sample",
                  levels=coverage,
              )
          )
          interval_predictions.append(in_sample_interval_predictions)
  
      if out_of_sample_horizon:
          out_of_sample_interval_predictions = (
              self._predict_in_or_out_of_sample(
                  out_of_sample_horizon,
                  "out-of-sample",
                  X=X_predict_input,
                  levels=coverage,
              )
          )
          interval_predictions.append(
              out_of_sample_interval_predictions
          )
  
      final_interval_predictions = pandas.concat(
          interval_predictions, copy=False
      )
  
      return final_interval_predictions
  
imports: from inspect import signature
  from typing import Dict
  from warnings import warn
  import pandas
  from sktime.forecasting.base import BaseForecaster
label_desc: Use image node_id 12 for calling the _GeneralisedStatsForecastAdapter obj's underlying member method code with example usage: obj._predict_interval(fh, X, coverage) and returns: final_interval_predictions