class_docstr: Wrapper for quantile forecasting models.
  
  This provides a unified API for the forecast_quantile method
  in addition to the forecast method provided by the base class.
  Additionally, this wrapper knows how to work with models from
  certain packages such as AzureML and sktime.
  Other models are expected to have a forecast method that takes
  a DataFrame with the time series ID features and time feature.
class_docstr_tok: ["Wrapper","for","quantile","forecasting","models",".","This","provides","a","unified","API","for","the","forecast_quantile","method","in","addition","to","the","forecast","method","provided","by","the","base","class",".","Additionally",",","this","wrapper","knows","how","to","work","with","models","from","certain","packages","such","as","AzureML","and","sktime",".","Other","models","are","expected","to","have","a","forecast","method","that","takes","a","DataFrame","with","the","time","series","ID","features","and","time","feature","."]
docstr: Returns the forecast for the given quantiles.
  
  If no quantiles are passed, the default quantiles 0.025 and 0.975
  are used.
docstr_tok: ["Returns","the","forecast","for","the","given","quantiles",".","If","no","quantiles","are","passed",",","the","default","quantiles","0.025","and","0.975","are","used","."]
code: def forecast_quantiles(self, X, quantiles=None):
      """Returns the forecast for the given quantiles.
  
      If no quantiles are passed, the default quantiles 0.025 and 0.975
      are used.
      """
      if quantiles is None:
          quantiles = [0.025, 0.975]
      if (
          not isinstance(quantiles, list)
          or len(quantiles) == 0
          or any(
              [
                  not isinstance(q, float) or q <= 0 or q >= 1
                  for q in quantiles
              ]
          )
      ):
          raise ValueError(
              "quantiles must be a list of floats between 0 and 1."
          )
      if self._model_package == _AZUREML:
          # AzureML forecasting models don't take quantiles as an
          # argument but instead need to have it set on the model
          # object.
          self._model.quantiles = quantiles
          return self._model.forecast_quantiles(X)
      if self._model_package == _SKTIME:
  
          def forecast_quantiles_method(X, fh):
              return self._model.predict_quantiles(
                  X=X, fh=fh, alpha=quantiles
              )
  
          return self._apply_sktime_method(forecast_quantiles_method, X)
      return self._model.forecast_quantiles(X, quantiles)
  
file_path: responsible-ai-toolbox/responsibleai/responsibleai/_internal/_forecasting_wrappers.py
imports: import inspect
  import sys
  import pandas
  from ml_wrappers.model.base_wrapped_model import BaseWrappedModel
  from raiutils.models import Forecasting, ModelTask
label_desc: Use image node_id 2 for calling the _WrappedQuantileForecastingModel obj's underlying member method code with example usage: obj.forecast_quantiles(X, quantiles) and returns: self, self, self, self