class_docstr: Hierarchical reconciliation forecaster.
  
  Reconciliation is applied to make the forecasts in a hierarchy of
  time-series sum together appropriately.
  
  The base forecasts are first generated for each member separately in the
  hierarchy using any forecaster. The base forecasts are then reonciled
  so that they sum together appropriately. This reconciliation step can often
  improve the skill of the forecasts in the hierarchy.
  
  Please refer to [1]_ for further information.
  
  Parameters
  ----------
  forecaster : estimator
      Estimator to generate base forecasts which are then reconciled
  method : {"mint_cov", "mint_shrink", "ols", "wls_var", "wls_str",             "bu", "td_fcst"}, default="mint_shrink"
      The reconciliation approach applied to the forecasts based on:
          * "mint_cov" - sample covariance
          * "mint_shrink" - covariance with shrinkage
          * "ols" - ordinary least squares
          * "wls_var" - weighted least squares (variance)
          * "wls_str" - weighted least squares (structural)
          * "bu" - bottom-up
          * "td_fcst" - top down based on forecast proportions
  
  See Also
  --------
  Aggregator
  Reconciler
  
  References
  ----------
  .. [1] https://otexts.com/fpp3/hierarchical.html
  
  Examples
  --------
  >>> from sktime.forecasting.naive import NaiveForecaster
  >>> from sktime.forecasting.reconcile import ReconcilerForecaster
  >>> from sktime.transformations.hierarchical.aggregate import Aggregator
  >>> from sktime.utils._testing.hierarchical import _bottom_hier_datagen
  >>> agg = Aggregator()
  >>> y = _bottom_hier_datagen(
  ...     no_bottom_nodes=3,
  ...     no_levels=1,
  ...     random_seed=123,
  ...     length=7,
  ... )
  >>> y = agg.fit_transform(y)
  >>> forecaster = NaiveForecaster(strategy="drift")
  >>> reconciler = ReconcilerForecaster(forecaster, method="mint_shrink")
  >>> reconciler.fit(y)
  ReconcilerForecaster(...)
  >>> prds_recon = reconciler.predict(fh=[1])
class_docstr_tok: ["Hierarchical","reconciliation","forecaster",".","Reconciliation","is","applied","to","make","the","forecasts","in","a","hierarchy","of","time-series","sum","together","appropriately",".","The","base","forecasts","are","first","generated","for","each","member","separately","in","the","hierarchy","using","any","forecaster",".","The","base","forecasts","are","then","reonciled","so","that","they","sum","together","appropriately",".","This","reconciliation","step","can","often","improve","the","skill","of","the","forecasts","in","the","hierarchy",".","Please","refer","to","[","1","]","_","for","further","information",".","Parameters","--","--","--","--","--","forecaster",":","estimator","Estimator","to","generate","base","forecasts","which","are","then","reconciled","method",":","{","``","mint_cov","''",",","``","mint_shrink","''",",","``","ols","''",",","``","wls_var","''",",","``","wls_str","''",",","``","bu","''",",","``","td_fcst","''","}",",","default=","''","mint_shrink","''","The","reconciliation","approach","applied","to","the","forecasts","based","on",":","*","``","mint_cov","''","-","sample","covariance","*","``","mint_shrink","''","-","covariance","with","shrinkage","*","``","ols","''","-","ordinary","least","squares","*","``","wls_var","''","-","weighted","least","squares","(","variance",")","*","``","wls_str","''","-","weighted","least","squares","(","structural",")","*","``","bu","''","-","bottom-up","*","``","td_fcst","''","-","top","down","based","on","forecast","proportions","See","Also","--","--","--","--","Aggregator","Reconciler","References","--","--","--","--","--","..","[","1","]","https",":","\/\/otexts.com\/fpp3\/hierarchical.html","Examples","--","--","--","--",">",">",">","from","sktime.forecasting.naive","import","NaiveForecaster",">",">",">","from","sktime.forecasting.reconcile","import","ReconcilerForecaster",">",">",">","from","sktime.transformations.hierarchical.aggregate","import","Aggregator",">",">",">","from","sktime.utils._testing.hierarchical","import","_bottom_hier_datagen",">",">",">","agg","=","Aggregator","(",")",">",">",">","y","=","_bottom_hier_datagen","(","...","no_bottom_nodes=3",",","...","no_levels=1",",","...","random_seed=123",",","...","length=7",",","...",")",">",">",">","y","=","agg.fit_transform","(","y",")",">",">",">","forecaster","=","NaiveForecaster","(","strategy=","''","drift","''",")",">",">",">","reconciler","=","ReconcilerForecaster","(","forecaster",",","method=","''","mint_shrink","''",")",">",">",">","reconciler.fit","(","y",")","ReconcilerForecaster","(","...",")",">",">",">","prds_recon","=","reconciler.predict","(","fh=","[","1","]",")"]
docstr: Update time series to incremental training data.
  
  Parameters
  ----------
  y : pd.DataFrame
      Time series to which to fit the forecaster.
  X : pd.DataFrame, default=None
      Exogenous variables based to the base forecaster
  update_params : bool, optional (default=True)
      whether model parameters should be updated
  
  Returns
  -------
  self : reference to self
docstr_tok: ["Update","time","series","to","incremental","training","data",".","Parameters","--","--","--","--","--","y",":","pd.DataFrame","Time","series","to","which","to","fit","the","forecaster",".","X",":","pd.DataFrame",",","default=None","Exogenous","variables","based","to","the","base","forecaster","update_params",":","bool",",","optional","(","default=True",")","whether","model","parameters","should","be","updated","Returns","--","--","--","-","self",":","reference","to","self"]
code: def _update(self, y, X=None, update_params=True):
      """Update time series to incremental training data.
  
      Parameters
      ----------
      y : pd.DataFrame
          Time series to which to fit the forecaster.
      X : pd.DataFrame, default=None
          Exogenous variables based to the base forecaster
      update_params : bool, optional (default=True)
          whether model parameters should be updated
  
      Returns
      -------
      self : reference to self
      """
      # check index for no "__total", if not add totals to y
      if _check_index_no_total(y):
          y = self._add_totals(y)
  
      if X is not None:
          if _check_index_no_total(X):
              X = self._add_totals(X)
  
      self.forecaster_.update(y, X, update_params=update_params)
  
      if y.index.nlevels < 2 or np.isin(self.method, self.TRFORM_LIST):
          return self
  
      # update self.residuals_
      # bug in self.forecaster_.predict_residuals() for heir data
      fh_resid = ForecastingHorizon(
          y.index.get_level_values(-1).unique(), is_relative=False
      )
      update_residuals = y - self.forecaster_.predict(fh=fh_resid, X=X)
      self.residuals_ = pd.concat(
          [self.residuals_, update_residuals], axis=0
      )
      self.residuals_ = self.residuals_.sort_index()
  
      # could implement something specific here
      # for now just refit
      if self.method == "mint_cov":
          self.g_matrix = self._get_g_matrix_mint(shrink=False)
      elif self.method == "mint_shrink":
          self.g_matrix = self._get_g_matrix_mint(shrink=True)
      elif self.method == "wls_var":
          self.g_matrix = self._get_g_matrix_mint(
              shrink=False, diag_only=True
          )
      else:
          raise RuntimeError(
              "unreachable condition, error in _check_method"
          )
  
      return self
  
file_path: sktime/sktime/forecasting/reconcile.py
imports: import numpy
  import pandas
  from numpy.linalg import inv
  from sktime.forecasting.base import BaseForecaster, ForecastingHorizon
  from sktime.transformations.hierarchical.aggregate import _check_index_no_total
  from sktime.transformations.hierarchical.reconcile import Reconciler, _get_s_matrix, _parent_child_df
  from sktime.utils.warnings import warn
label_desc: Use image node_id 5 for calling the ReconcilerForecaster obj's underlying member method code with example usage: obj._update(y, X, update_params) and returns: self, self