class_docstr: An AutoARIMA estimator.
  
  Returns best ARIMA model according to either AIC, AICc or BIC value.
  The function conducts a search over possible model within the order constraints provided.
  
  Parameters
  ----------
  d: int optional (default None)
      Order of first-differencing.
      If missing, will choose a value based on `test`.
  D: int optional (default None)
      Order of seasonal-differencing.
      If missing, will choose a value based on `season_test`.
  max_p: int (default 5)
      Maximum value of p.
  max_q: int (default 5)
      Maximum value of q.
  max_P: int (default 2)
      Maximum value of P.
  max_Q: int (default 2)
      Maximum value of Q.
  max_order: int (default 5)
      Maximum value of p+q+P+Q if model selection is not stepwise.
  max_d: int (default 2)
      Maximum number of non-seasonal differences
  max_D: int (default 1)
      Maximum number of seasonal differences
  start_p: int (default 2)
      Starting value of p in stepwise procedure.
  start_q: int (default 2)
      Starting value of q in stepwise procedure.
  start_P: int (default 1)
      Starting value of P in stepwise procedure.
  start_Q: int (default 1)
      Starting value of Q in stepwise procedure.
  stationary: bool (default False)
      If True, restricts search to stationary models.
  seasonal: bool (default True)
      If False, restricts search to non-seasonal models.
  ic: str (default 'aicc')
      Information criterion to be used in model selection.
  stepwise: bool (default True)
      If True, will do stepwise selection (faster).
      Otherwise, it searches over all models.
      Non-stepwise selection can be very slow,
      especially for seasonal models.
  nmodels: int (default 94)
      Maximum number of models considered in the stepwise search.
  trace: bool (default False)
      If True, the list of ARIMA models considered will be reported.
  approximation: bool optional (default None)
      If True, estimation is via conditional sums of squares
      and the information criteria used for model
      selection are approximated.
      The final model is still computed using
      maximum likelihood estimation.
      Approximation should be used for long time series
      or a high seasonal period to avoid excessive computation times.
  method: str optional (default None)
      fitting method: maximum likelihood or minimize conditional
      sum-of-squares.
      The default (unless there are missing values)
      is to use conditional-sum-of-squares to find starting values,
      then maximum likelihood. Can be abbreviated.
  truncate: bool optional (default None)
      An integer value indicating how many observations
      to use in model selection.
      The last truncate values of the series are
      used to select a model when truncate is not None
      and approximation=True.
      All observations are used if either truncate=None
      or approximation=False.
  test: str (default 'kpss')
      Type of unit root test to use. See ndiffs for details.
  test_kwargs: str optional (default None)
      Additional arguments to be passed to the unit root test.
  seasonal_test: str (default 'seas')
      This determines which method is used to select the number
      of seasonal differences.
      The default method is to use a measure of seasonal
      strength computed from an STL decomposition.
      Other possibilities involve seasonal unit root tests.
  seasonal_test_kwargs: dict optional (default None)
      Additional arguments to be passed to the seasonal
      unit root test. See nsdiffs for details.
  allowdrift: bool (default True)
      If True, models with drift terms are considered.
  allowmean: bool (default True)
      If True, models with a non-zero mean are considered.
  blambda: float optional (default None)
      Box-Cox transformation parameter.
      If lambda="auto", then a transformation is automatically
      selected using BoxCox.lambda.
      The transformation is ignored if None.
      Otherwise, data transformed before model is estimated.
  biasadj: bool (default False)
      Use adjusted back-transformed mean for Box-Cox transformations.
      If transformed data is used to produce forecasts and fitted values,
      a regular back transformation will result in median forecasts.
      If biasadj is True, an adjustment will be made to produce
      mean forecasts and fitted values.
  period: int (default 1)
      Number of observations per unit of time.
      For example 24 for Hourly data.
  
  Notes
  -----
  * This implementation is a mirror of Hyndman's forecast::auto.arima.
  
  References
  ----------
  [1] https://github.com/robjhyndman/forecast
class_docstr_tok: ["An","AutoARIMA","estimator",".","Returns","best","ARIMA","model","according","to","either","AIC",",","AICc","or","BIC","value",".","The","function","conducts","a","search","over","possible","model","within","the","order","constraints","provided",".","Parameters","--","--","--","--","--","d",":","int","optional","(","default","None",")","Order","of","first-differencing",".","If","missing",",","will","choose","a","value","based","on","`","test","`",".","D",":","int","optional","(","default","None",")","Order","of","seasonal-differencing",".","If","missing",",","will","choose","a","value","based","on","`","season_test","`",".","max_p",":","int","(","default","5",")","Maximum","value","of","p.","max_q",":","int","(","default","5",")","Maximum","value","of","q.","max_P",":","int","(","default","2",")","Maximum","value","of","P.","max_Q",":","int","(","default","2",")","Maximum","value","of","Q.","max_order",":","int","(","default","5",")","Maximum","value","of","p+q+P+Q","if","model","selection","is","not","stepwise",".","max_d",":","int","(","default","2",")","Maximum","number","of","non-seasonal","differences","max_D",":","int","(","default","1",")","Maximum","number","of","seasonal","differences","start_p",":","int","(","default","2",")","Starting","value","of","p","in","stepwise","procedure",".","start_q",":","int","(","default","2",")","Starting","value","of","q","in","stepwise","procedure",".","start_P",":","int","(","default","1",")","Starting","value","of","P","in","stepwise","procedure",".","start_Q",":","int","(","default","1",")","Starting","value","of","Q","in","stepwise","procedure",".","stationary",":","bool","(","default","False",")","If","True",",","restricts","search","to","stationary","models",".","seasonal",":","bool","(","default","True",")","If","False",",","restricts","search","to","non-seasonal","models",".","ic",":","str","(","default","'aicc","'",")","Information","criterion","to","be","used","in","model","selection",".","stepwise",":","bool","(","default","True",")","If","True",",","will","do","stepwise","selection","(","faster",")",".","Otherwise",",","it","searches","over","all","models",".","Non-stepwise","selection","can","be","very","slow",",","especially","for","seasonal","models",".","nmodels",":","int","(","default","94",")","Maximum","number","of","models","considered","in","the","stepwise","search",".","trace",":","bool","(","default","False",")","If","True",",","the","list","of","ARIMA","models","considered","will","be","reported",".","approximation",":","bool","optional","(","default","None",")","If","True",",","estimation","is","via","conditional","sums","of","squares","and","the","information","criteria","used","for","model","selection","are","approximated",".","The","final","model","is","still","computed","using","maximum","likelihood","estimation",".","Approximation","should","be","used","for","long","time","series","or","a","high","seasonal","period","to","avoid","excessive","computation","times",".","method",":","str","optional","(","default","None",")","fitting","method",":","maximum","likelihood","or","minimize","conditional","sum-of-squares",".","The","default","(","unless","there","are","missing","values",")","is","to","use","conditional-sum-of-squares","to","find","starting","values",",","then","maximum","likelihood",".","Can","be","abbreviated",".","truncate",":","bool","optional","(","default","None",")","An","integer","value","indicating","how","many","observations","to","use","in","model","selection",".","The","last","truncate","values","of","the","series","are","used","to","select","a","model","when","truncate","is","not","None","and","approximation=True",".","All","observations","are","used","if","either","truncate=None","or","approximation=False",".","test",":","str","(","default","'kpss","'",")","Type","of","unit","root","test","to","use",".","See","ndiffs","for","details",".","test_kwargs",":","str","optional","(","default","None",")","Additional","arguments","to","be","passed","to","the","unit","root","test",".","seasonal_test",":","str","(","default","'seas","'",")","This","determines","which","method","is","used","to","select","the","number","of","seasonal","differences",".","The","default","method","is","to","use","a","measure","of","seasonal","strength","computed","from","an","STL","decomposition",".","Other","possibilities","involve","seasonal","unit","root","tests",".","seasonal_test_kwargs",":","dict","optional","(","default","None",")","Additional","arguments","to","be","passed","to","the","seasonal","unit","root","test",".","See","nsdiffs","for","details",".","allowdrift",":","bool","(","default","True",")","If","True",",","models","with","drift","terms","are","considered",".","allowmean",":","bool","(","default","True",")","If","True",",","models","with","a","non-zero","mean","are","considered",".","blambda",":","float","optional","(","default","None",")","Box-Cox","transformation","parameter",".","If","lambda=","''","auto","''",",","then","a","transformation","is","automatically","selected","using","BoxCox.lambda",".","The","transformation","is","ignored","if","None",".","Otherwise",",","data","transformed","before","model","is","estimated",".","biasadj",":","bool","(","default","False",")","Use","adjusted","back-transformed","mean","for","Box-Cox","transformations",".","If","transformed","data","is","used","to","produce","forecasts","and","fitted","values",",","a","regular","back","transformation","will","result","in","median","forecasts",".","If","biasadj","is","True",",","an","adjustment","will","be","made","to","produce","mean","forecasts","and","fitted","values",".","period",":","int","(","default","1",")","Number","of","observations","per","unit","of","time",".","For","example","24","for","Hourly","data",".","Notes","--","--","-","*","This","implementation","is","a","mirror","of","Hyndman","'s","forecast",":",":auto.arima",".","References","--","--","--","--","--","[","1","]","https",":","\/\/github.com\/robjhyndman\/forecast"]
docstr: Forecast future values using a fitted AutoArima.
  
  Parameters
  ----------
  h: int
      Number of periods for forecasting.
  X: array-like of shape (h, n_x) optional (default=None)
      Future exogenous variables.
  level: int
      Confidence level for prediction intervals.
  
  Returns
  -------
  forecasts : pandas dataframe of shape (n, 1 + len(level))
      The array of fitted values.
      The confidence intervals for the forecasts are returned if
      level is not None.
code: def predict(
      self,
      h: int,
      X: Optional[np.ndarray] = None,
      level: Optional[Union[int, Tuple[int]]] = None,
  ):
      """Forecast future values using a fitted AutoArima.
  
      Parameters
      ----------
      h: int
          Number of periods for forecasting.
      X: array-like of shape (h, n_x) optional (default=None)
          Future exogenous variables.
      level: int
          Confidence level for prediction intervals.
  
      Returns
      -------
      forecasts : pandas dataframe of shape (n, 1 + len(level))
          The array of fitted values.
          The confidence intervals for the forecasts are returned if
          level is not None.
      """
      forecast = forecast_arima(
          self.model_.model,
          h=h,
          xreg=X,
          level=(level,) if isinstance(level, int) else level,
      )
  
      mean = pd.DataFrame({"mean": forecast["mean"]})
  
      if level is not None:
          lo = forecast["lower"].add_prefix("lo_")
          hi = forecast["upper"].add_prefix("hi_")
  
          return pd.concat([lo, mean, hi], axis=1)
  
      return mean
  
imports: import math
  import warnings
  from collections import namedtuple
  from functools import partial
  from typing import Optional, Dict, Union, Tuple
  import numpy
  import pandas
  import statsmodels.api
  from numba import njit
  from scipy.optimize import minimize
  from scipy.stats import norm
  from .mstl import mstl
  from .utils import CACHE, NOGIL
label_desc: Use image node_id 3 for calling the AutoARIMA obj's underlying member method code with example usage: obj.predict(h, X, level) and returns: mean, pd