class_docstr: Inherits time series methods from TSM class.
  
  **** NON-GAUSSIAN LOCAL LEVEL MODEL ****
  
  Parameters
  ----------
  data : pd.DataFrame or np.array
      Field to specify the time series data that will be used.
  
  integ : int (default : 0)
      Specifies how many times to difference the time series.
  
  target : str (pd.DataFrame) or int (np.array)
      Specifies which column name or array index to use. By default, first
      column/array will be selected as the dependent variable.
  
  family : 
      e.g. pf.Normal(0,1)
class_docstr_tok: ["Inherits","time","series","methods","from","TSM","class",".","*","*","*","*","NON-GAUSSIAN","LOCAL","LEVEL","MODEL","*","*","*","*","Parameters","--","--","--","--","--","data",":","pd.DataFrame","or","np.array","Field","to","specify","the","time","series","data","that","will","be","used",".","integ",":","int","(","default",":","0",")","Specifies","how","many","times","to","difference","the","time","series",".","target",":","str","(","pd.DataFrame",")","or","int","(","np.array",")","Specifies","which","column","name","or","array","index","to","use",".","By","default",",","first","column\/array","will","be","selected","as","the","dependent","variable",".","family",":","e.g",".","pf.Normal","(","0,1",")"]
docstr: Preoptimizes the model by estimating a Gaussian state space models
  
  Returns
  ----------
  - Gaussian model latent variable object
docstr_tok: ["Preoptimizes","the","model","by","estimating","a","Gaussian","state","space","models","Returns","--","--","--","--","--","-","Gaussian","model","latent","variable","object"]
code: def _preoptimize_model(self):
      """Preoptimizes the model by estimating a Gaussian state space models
  
      Returns
      ----------
      - Gaussian model latent variable object
      """
      gaussian_model = LLEV(
          self.data, integ=self.integ, target=self.target
      )
      gaussian_model.fit()
      self.latent_variables.z_list[
          0
      ].start = gaussian_model.latent_variables.get_z_values()[1]
  
      if self.model_name2 == "t":
  
          def temp_function(params):
              return -np.sum(
                  ss.t.logpdf(
                      x=self.data,
                      df=np.exp(params[0]),
                      loc=np.ones(self.data.shape[0]) * params[1],
                      scale=np.exp(params[2]),
                  )
              )
  
          p = optimize.minimize(
              temp_function,
              np.array([2.0, 0.0, -1.0]),
              method="L-BFGS-B",
          )
          self.latent_variables.z_list[1].start = p.x[2]
          self.latent_variables.z_list[2].start = p.x[0]
  
      elif self.model_name2 == "Skewt":
  
          def temp_function(params):
              return -np.sum(
                  fam.Skewt.logpdf_internal(
                      x=self.data,
                      df=np.exp(params[0]),
                      loc=np.ones(self.data.shape[0]) * params[1],
                      scale=np.exp(params[2]),
                      gamma=np.exp(params[3]),
                  )
              )
  
          p = optimize.minimize(
              temp_function,
              np.array([2.0, 0.0, -1.0, 0.0]),
              method="L-BFGS-B",
          )
          self.latent_variables.z_list[1].start = p.x[3]
          self.latent_variables.z_list[2].start = p.x[2]
          self.latent_variables.z_list[3].start = p.x[0]
  
      return gaussian_model.latent_variables
  
imports: import sys
  import numpy
  import pandas
  import scipy.stats
  from scipy import optimize
  from ..None import inference
  from ..None import families
  from ..None import output
  from ..None import tsm
  from ..None import data_check
  from ..None import covariances
  from ..None import results
  from ..None import gas
  from .kalman import *
  from .llm import *
label_desc: Use image node_id 14 for calling the NLLEV obj's underlying member method code with example usage: obj._preoptimize_model() and returns: gaussian_model, unknown, unknown