docstr: Naive Drift Model
  
  This model fits a line between the first and last point of the training series,
  and extends it in the future. For a training series of length :math:`T`, we have:
  
  .. math:: \hat{y}_{T+h} = y_T + h\left( \frac{y_T - y_1}{T - 1} \right)
  
  Examples
  --------
  >>> from darts.datasets import AirPassengersDataset
  >>> from darts.models import NaiveDrift
  >>> series = AirPassengersDataset().load()
  >>> model = NaiveDrift()
  >>> model.fit(series)
  >>> pred = model.predict(6)
  >>> pred.values()
  array([[434.23776224],
         [436.47552448],
         [438.71328671],
         [440.95104895],
         [443.18881119],
         [445.42657343]])
docstr_tok: ["Naive","Drift","Model","This","model","fits","a","line","between","the","first","and","last","point","of","the","training","series",",","and","extends","it","in","the","future",".","For","a","training","series","of","length",":","math",":","`","T","`",",","we","have",":","..","math",":",":","\\hat","{","y","}","_","{","T+h","}","=","y_T","+","h\\left","(","\\frac","{","y_T","-","y_1","}","{","T","-","1","}","\\right",")","Examples","--","--","--","--",">",">",">","from","darts.datasets","import","AirPassengersDataset",">",">",">","from","darts.models","import","NaiveDrift",">",">",">","series","=","AirPassengersDataset","(",")",".load","(",")",">",">",">","model","=","NaiveDrift","(",")",">",">",">","model.fit","(","series",")",">",">",">","pred","=","model.predict","(","6",")",">",">",">","pred.values","(",")","array","(","[","[","434.23776224","]",",","[","436.47552448","]",",","[","438.71328671","]",",","[","440.95104895","]",",","[","443.18881119","]",",","[","445.42657343","]","]",")"]
code: def __init__(self):
      """Naive Drift Model
  
      This model fits a line between the first and last point of the training series,
      and extends it in the future. For a training series of length :math:`T`, we have:
  
      .. math:: \\hat{y}_{T+h} = y_T + h\\left( \\frac{y_T - y_1}{T - 1} \\right)
  
      Examples
      --------
      >>> from darts.datasets import AirPassengersDataset
      >>> from darts.models import NaiveDrift
      >>> series = AirPassengersDataset().load()
      >>> model = NaiveDrift()
      >>> model.fit(series)
      >>> pred = model.predict(6)
      >>> pred.values()
      array([[434.23776224],
             [436.47552448],
             [438.71328671],
             [440.95104895],
             [443.18881119],
             [445.42657343]])
      """
      super().__init__()
  
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 NaiveDrift object from inherited base classes: LocalForecastingModel with example: obj = NaiveDrift()