docstr: Naive Seasonal Model
  
  This model always predicts the value of `K` time steps ago.
  When `K=1`, this model predicts the last value of the training set.
  When `K>1`, it repeats the last `K` values of the training set.
  
  Parameters
  ----------
  K
      the number of last time steps of the training set to repeat
  
  Examples
  --------
  >>> from darts.datasets import AirPassengersDataset
  >>> from darts.models import NaiveSeasonal
  >>> series = AirPassengersDataset().load()
  # prior analysis suggested seasonality of 12
  >>> model = NaiveSeasonal(K=12)
  >>> model.fit(series)
  >>> pred = model.predict(6)
  >>> pred.values()
  array([[417.],
         [391.],
         [419.],
         [461.],
         [472.],
         [535.]])
docstr_tok: ["Naive","Seasonal","Model","This","model","always","predicts","the","value","of","`","K","`","time","steps","ago",".","When","`","K=1","`",",","this","model","predicts","the","last","value","of","the","training","set",".","When","`","K",">","1","`",",","it","repeats","the","last","`","K","`","values","of","the","training","set",".","Parameters","--","--","--","--","--","K","the","number","of","last","time","steps","of","the","training","set","to","repeat","Examples","--","--","--","--",">",">",">","from","darts.datasets","import","AirPassengersDataset",">",">",">","from","darts.models","import","NaiveSeasonal",">",">",">","series","=","AirPassengersDataset","(",")",".load","(",")","#","prior","analysis","suggested","seasonality","of","12",">",">",">","model","=","NaiveSeasonal","(","K=12",")",">",">",">","model.fit","(","series",")",">",">",">","pred","=","model.predict","(","6",")",">",">",">","pred.values","(",")","array","(","[","[","417",".","]",",","[","391",".","]",",","[","419",".","]",",","[","461",".","]",",","[","472",".","]",",","[","535",".","]","]",")"]
code: def __init__(self, K: int = 1):
      """Naive Seasonal Model
  
      This model always predicts the value of `K` time steps ago.
      When `K=1`, this model predicts the last value of the training set.
      When `K>1`, it repeats the last `K` values of the training set.
  
      Parameters
      ----------
      K
          the number of last time steps of the training set to repeat
  
      Examples
      --------
      >>> from darts.datasets import AirPassengersDataset
      >>> from darts.models import NaiveSeasonal
      >>> series = AirPassengersDataset().load()
      # prior analysis suggested seasonality of 12
      >>> model = NaiveSeasonal(K=12)
      >>> model.fit(series)
      >>> pred = model.predict(6)
      >>> pred.values()
      array([[417.],
             [391.],
             [419.],
             [461.],
             [472.],
             [535.]])
      """
      super().__init__()
      self.last_k_vals = None
      self.K = K
  
imports: from typing import List, Optional, Sequence, Union
  import numpy
  from darts.logging import get_logger, raise_if, raise_if_not
  from darts.models.forecasting.ensemble_model import EnsembleModel
  from darts.models.forecasting.forecasting_model import ForecastingModel, LocalForecastingModel
  from darts.timeseries import TimeSeries
label_desc: Use image node_id 1 to create a new NaiveSeasonal object from inherited base classes: LocalForecastingModel with example: obj = NaiveSeasonal(K)