class_docstr: The lag based estimator, using lagged observations with aggregation functions
  to forecast the future. This estimator includes the common week-over-week estimation method.
  
  The algorithm support specifying the following:
  
      lag_unit : the unit to calculate lagged values. One of the values in
          `~greykite.sklearn.estimator.lag_based_estimator.LagUnitEnum`.
      lags : a list of lags indicating which lagged ``lag_unit`` data are used in prediction.
          For example, [1, 2] indicating using the past two ``lag_unit`` same time data.
      agg_func : the aggregation function used over the lagged observations.
      agg_func_params : extra parameters used for ``agg_func``.
  
  
  When certain lags are not available, extra data will be extrapolated.
  When predicting into the future and future data is not available,
  predicted values will be used.
  
  Parameters
  ----------
  freq : `str` or None, default None
      The data frequency, used to validate lags.
  lag_unit : `str`, default "week"
      The unit to calculate lagged observations.
      Available options are in `~greykite.sklearn.estimator.lag_based_estimator.LagUnitEnum`.
  lags : `list` [`int`] or None, default None
      The lags in ``lag_unit``'s. [1, 2] indicates using the past two ``lag_unit`` same time values.
      If not provided, the default is to use lag 1 observation only.
  agg_func : `str` or callable, default "mean"
      The aggregation functions used over lagged observations.
  agg_func_params : `dict` or None, default None
      Extra parameters used for ``agg_func``.
  uncertainty_dict: `dict` or None, default None
      How to fit the uncertainty model.
      See `~greykite.sklearn.uncertainty.uncertainty_methods.UncertaintyMethodEnum`.
      If not provided but ``coverage`` is given, this falls back to
      `~greykite.sklearn.uncertainty.simple_conditional_residuals_model.SimpleConditionalResidualsModel`.
  past_df : `pandas.DataFrame` or None, default None
      The past data used to append to the training data.
      If not provided the past data needed will be interpolated.
  series_na_fill_func : `callable` or None, default `lambda s: s.bfill().ffill()`
      The function to fill NAs when they exist.
  
  Attributes
  ----------
  df : `pandas.DataFrame` or None
      The fitted and interpolated training data.
  uncertainty_model : any or None
      The trained uncertainty model.
  max_lag_order : `int` or None
      The maximum lag order.
  min_lag_order : `int` or None
      The minimum lag order.
  train_start : `pandas.Timestamp` or None
      The training start timestamp.
  train_end : `pandas.Timestamp` or None
      The training end timestamp.
class_docstr_tok: ["The","lag","based","estimator",",","using","lagged","observations","with","aggregation","functions","to","forecast","the","future",".","This","estimator","includes","the","common","week-over-week","estimation","method",".","The","algorithm","support","specifying","the","following",":","lag_unit",":","the","unit","to","calculate","lagged","values",".","One","of","the","values","in","`","~greykite.sklearn.estimator.lag_based_estimator.LagUnitEnum","`",".","lags",":","a","list","of","lags","indicating","which","lagged","``","lag_unit","``","data","are","used","in","prediction",".","For","example",",","[","1",",","2","]","indicating","using","the","past","two","``","lag_unit","``","same","time","data",".","agg_func",":","the","aggregation","function","used","over","the","lagged","observations",".","agg_func_params",":","extra","parameters","used","for","``","agg_func","``",".","When","certain","lags","are","not","available",",","extra","data","will","be","extrapolated",".","When","predicting","into","the","future","and","future","data","is","not","available",",","predicted","values","will","be","used",".","Parameters","--","--","--","--","--","freq",":","`","str","`","or","None",",","default","None","The","data","frequency",",","used","to","validate","lags",".","lag_unit",":","`","str","`",",","default","``","week","''","The","unit","to","calculate","lagged","observations",".","Available","options","are","in","`","~greykite.sklearn.estimator.lag_based_estimator.LagUnitEnum","`",".","lags",":","`","list","`","[","`","int","`","]","or","None",",","default","None","The","lags","in","``","lag_unit","``","'s",".","[","1",",","2","]","indicates","using","the","past","two","``","lag_unit","``","same","time","values",".","If","not","provided",",","the","default","is","to","use","lag","1","observation","only",".","agg_func",":","`","str","`","or","callable",",","default","``","mean","''","The","aggregation","functions","used","over","lagged","observations",".","agg_func_params",":","`","dict","`","or","None",",","default","None","Extra","parameters","used","for","``","agg_func","``",".","uncertainty_dict",":","`","dict","`","or","None",",","default","None","How","to","fit","the","uncertainty","model",".","See","`","~greykite.sklearn.uncertainty.uncertainty_methods.UncertaintyMethodEnum","`",".","If","not","provided","but","``","coverage","``","is","given",",","this","falls","back","to","`","~greykite.sklearn.uncertainty.simple_conditional_residuals_model.SimpleConditionalResidualsModel","`",".","past_df",":","`","pandas.DataFrame","`","or","None",",","default","None","The","past","data","used","to","append","to","the","training","data",".","If","not","provided","the","past","data","needed","will","be","interpolated",".","series_na_fill_func",":","`","callable","`","or","None",",","default","`","lambda","s",":","s.bfill","(",")",".ffill","(",")","`","The","function","to","fill","NAs","when","they","exist",".","Attributes","--","--","--","--","--","df",":","`","pandas.DataFrame","`","or","None","The","fitted","and","interpolated","training","data",".","uncertainty_model",":","any","or","None","The","trained","uncertainty","model",".","max_lag_order",":","`","int","`","or","None","The","maximum","lag","order",".","min_lag_order",":","`","int","`","or","None","The","minimum","lag","order",".","train_start",":","`","pandas.Timestamp","`","or","None","The","training","start","timestamp",".","train_end",":","`","pandas.Timestamp","`","or","None","The","training","end","timestamp","."]
docstr: The summary of model.
docstr_tok: ["The","summary","of","model","."]
code: def summary(self):
      """The summary of model."""
      super().summary()
      text = (
          f"This is a lag based forecast model that uses lags '{self.lags}', "
          f"with unit '{self.lag_unit}' and aggregation function '{self.agg_func}'."
      )
      log_message(message=text, level=LoggingLevelEnum.INFO)
      return text
  
imports: from enum import Enum
  from typing import List
  from typing import Optional
  from typing import Union
  import numpy
  import pandas
  from dateutil.relativedelta import relativedelta
  from sklearn.metrics import mean_squared_error
  from greykite.common import constants
  from greykite.common.aggregation_function_enum import AggregationFunctionEnum
  from greykite.common.logging import LoggingLevelEnum
  from greykite.common.logging import log_message
  from greykite.common.time_properties import fill_missing_dates
  from greykite.common.time_properties import infer_freq
  from greykite.sklearn.estimator.base_forecast_estimator import BaseForecastEstimator
label_desc: Use image node_id 7 for calling the LagBasedEstimator obj's underlying member method code with example usage: obj.summary() and returns: text