class_docstr: The quantile regression based uncertainty model.
  Predicts quantiles as the prediction intervals.
  The quantiles are calculated based on the ``coverage`` parameter.
  For example, a 90% prediction interval is the 0.05 quantile and 0.95 quantile predictions.
  
  There are four scenarios:
  
      - ``is_residual_based = False`` and ``x_mat`` is provided.
        In this case, the method fits two quantile regression models based on the ``value_col`` and ``x_mat``.
        Depending on the forecast model, the generated prediction intervals may not cover the forecasted values.
      - ``is_residual_based = False`` and ``x_mat`` is not provided.
        In this case, a ``x_mat`` is generated based on ``time_col``
        including linear growth and yearly/weekly seasonality.
        Currently we do not support customizing the generation of this feature matrix.
        The method fits two quantile regression models based on ``value_col`` and the generated ``x_mat``.
        Depending on the forecast model, the generated prediction intervals may not cover the forecasted values.
      - ``is_residual_based = True`` and ``x_mat`` is provided.
        In this case, the ``predicted_col`` needs to be provided
        in addition to ``value_col`` to calculate the residuals.
        The method fits two quantile regression models based on the residuals and ``x_mat``.
        The fitted residual quantiles are added to the forecasted values.
      - ``is_residual_based = True`` and ``x_mat`` is not provided.
        In this case, the ``predicted_col`` needs to be provided
        in addition to ``value_col`` to calculate the residuals.
        In this case, a ``x_mat`` is generated based on ``time_col``
        including linear growth and yearly/weekly seasonality.
        Currently we do not support customizing the generation of this feature matrix.
        The method fits two quantile regression models based on residuals and the generated ``x_mat``.
        The fitted residual quantiles are added to the forecasted values.
  
  If ``x_mat`` is not provided, ``time_col`` must be provided to build the feature matrix.
  
  If ``is_residual_based = False``, then ``value_col`` must be provided to train the model.
  If ``is_residual_based = True``, then both ``value_col`` and ``predicted_col`` must be provided.
  In this case, the method also tries to find ``cst.PREDICTED_COL`` in the training data
  too if ``predicted_col`` is not provided.
  
  Attributes
  ----------
  uncertainty_dict : `dict` [`str`, any]
      The uncertainty model specification. It should have the following keys:
  
              "uncertainty_method": a string that is in
                  `~greykite.sklearn.uncertainty.uncertainty_methods.UncertaintyMethodEnum`.
              "params": a dictionary that includes any additional parameters needed by the uncertainty method.
                        Expected keys include: "value_col", "predicted_col", "is_residual_based"
                        and "quantiles".
  
  UNCERTAINTY_METHOD : `str`
      The name for the uncertainty method.
  REQUIRED_PARAMS : `list` [`str`]
      A list of required parameters for the method.
  coverage : `float`
      The coverage of the uncertainty intervals.
      Will be used to calculate the quantiles.
  time_col : `str`
      The column name for timestamps in ``train_df`` and ``fut_df``.
  value_col : `str` or None
      The column name for values in ``train_df`` and ``fut_df``.
  predicted_col : `str` or None
      The column name for predicted values in ``train_df`` and ``fut_df``.
  residual_col : `str` or None
      The column name for residuals in ``train_df``.
  quantiles : `list` [`float`] or None
      A list of quantiles to be fitted.
      This is also derived from the ``coverage`` parameter.
  is_residual_based : `bool` or None
      Whether to fit the original values or residuals.
  models : `list` [`QuantileRegression`] or None
      A list of trained quantile regression models.
  x_mat : `pandas.DataFrame` or None
      The feature matrix used to fit the model.
  build_x_mat : `bool` or None
      Whether the feature matrix is built. If False, it is provided.
  distribution_col : `str` or None
      The column name for the column used as response in fitting the quantile regression models.
  offset_col : `str` or None
      The column name for the column used to offset the predicted intervals.
code: def __init__(
      self,
      uncertainty_dict: Dict[str, any],
      coverage: Optional[float] = None,
      time_col: Optional[str] = None,
      **kwargs,
  ):
      super().__init__(uncertainty_dict=uncertainty_dict, **kwargs)
  
      self.coverage = coverage
      self.time_col = time_col
  
      # Derived column names.
      self.distribution_col: Optional[str] = None
      self.offset_col: Optional[str] = None
  
      # Set by ``fit`` method.
      self.is_residual_based: Optional[bool] = None
      self.x_mat: Optional[pd.DataFrame] = None
      self.build_x_mat: Optional[bool] = None
      self.value_col: Optional[str] = None
      self.residual_col: Optional[str] = None
      self.quantiles: Optional[List[float]] = None
      self.models: Optional[List[QuantileRegression]] = None
  
imports: from __future__ import annotations
  from typing import Dict
  from typing import List
  from typing import Optional
  import pandas
  from sklearn.exceptions import NotFittedError
  from greykite.algo.common.l1_quantile_regression import QuantileRegression
  from greykite.algo.forecast.silverkite.forecast_silverkite import SilverkiteForecast
  from greykite.algo.forecast.silverkite.forecast_silverkite_helper import get_fourier_feature_col_names
  from greykite.algo.forecast.silverkite.forecast_silverkite_helper import get_silverkite_uncertainty_dict
  from greykite.common import constants
  from greykite.common.features.timeseries_features import fourier_series_multi_fcn
  from greykite.common.features.timeseries_features import get_default_origin_for_time_vars
  from greykite.sklearn.uncertainty.base_uncertainty_model import BaseUncertaintyModel
  from greykite.sklearn.uncertainty.exceptions import UncertaintyError
label_desc: Use image node_id 1 to create a new QuantileRegressionUncertaintyModel object from inherited base classes: BaseUncertaintyModel with example: obj = QuantileRegressionUncertaintyModel(uncertainty_dict, coverage, time_col)