docstr: Returns the 'unfit' SARIMAX model with the given dataset and the
  selected best parameters. This can be used to fit or refit the model.
docstr_tok: ["Returns","the","'unfit","'","SARIMAX","model","with","the","given","dataset","and","the","selected","best","parameters",".","This","can","be","used","to","fit","or","refit","the","model","."]
code: def get_best_model(self, data: pd.DataFrame):
      """
      Returns the 'unfit' SARIMAX model with the given dataset and the
      selected best parameters. This can be used to fit or refit the model.
      """
  
      # In order to get forecasts to be in the same value ranges of the orig_endogs, you
      # must  set the simple_differencing = False and the start_params to be the same as ARIMA.
      # That is the only way to ensure that the output of this model iscomparable to other ARIMA models
  
      if not self.seasonality:
          if self.univariate:
              bestmodel = SARIMAX(
                  endog=data[self.original_target_col],
                  # exog=data[self.original_preds], ###if it is univariate, no preds needed
                  order=(self.best_p, self.best_d, self.best_q),
                  enforce_stationarity=False,
                  enforce_invertibility=False,
                  trend="ct",
                  start_params=[0, 0, 0, 1],
                  simple_differencing=False,
              )
          else:
              bestmodel = SARIMAX(
                  endog=data[self.original_target_col],
                  exog=data[
                      self.original_preds
                  ],  ## if it is multivariate, preds are needed
                  order=(self.best_p, self.best_d, self.best_q),
                  enforce_stationarity=False,
                  enforce_invertibility=False,
                  trend="ct",
                  start_params=[0, 0, 0, 1],
                  simple_differencing=False,
              )
      else:
          if self.univariate:
              bestmodel = SARIMAX(
                  endog=data[self.original_target_col],
                  # exog=data[self.original_preds], ### if univariate, no preds are needed
                  order=(self.best_p, self.best_d, self.best_q),
                  seasonal_order=(
                      self.best_P,
                      self.best_D,
                      self.best_Q,
                      self.seasonal_period,
                  ),
                  enforce_stationarity=False,
                  enforce_invertibility=False,
                  trend="ct",
                  start_params=[0, 0, 0, 1],
                  simple_differencing=False,
              )
          else:
              bestmodel = SARIMAX(
                  endog=data[self.original_target_col],
                  exog=data[
                      self.original_preds
                  ],  ### if multivariate, preds are needed
                  order=(self.best_p, self.best_d, self.best_q),
                  seasonal_order=(
                      self.best_P,
                      self.best_D,
                      self.best_Q,
                      self.seasonal_period,
                  ),
                  enforce_stationarity=False,
                  enforce_invertibility=False,
                  trend="ct",
                  start_params=[0, 0, 0, 1],
                  simple_differencing=False,
              )
  
      return bestmodel
  
imports: from typing import Optional
  import warnings
  from abc import abstractmethod
  import copy
  import pdb
  import numpy
  import pandas
  from pandas.core.generic import NDFrame
  import dask
  import dask.dataframe
  import matplotlib.pyplot
  from sklearn.model_selection import TimeSeriesSplit
  from statsmodels.tsa.statespace.sarimax import SARIMAX
  from ..build_base import BuildBase
  from ...utils import colorful, print_static_rmse, print_dynamic_rmse, print_ts_model_stats
  from ...models.ar_based.param_finder import find_best_pdq_or_PDQ
label_desc: Use image node_id 5 for calling the BuildArimaBase obj's underlying member method code with example usage: obj.get_best_model(data) and returns: bestmodel