class_docstr: Inherits time series methods from TSM class.
  
  **** 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 time 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.
class_docstr_tok: ["Inherits","time","series","methods","from","TSM","class",".","*","*","*","*","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","time","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","."]
docstr: Plots the fit of the model
  
  Parameters
  ----------
  intervals : Boolean
      Whether to plot 95% confidence interval of states
  
  Returns
  ----------
  None (plots data and the fit)
docstr_tok: ["Plots","the","fit","of","the","model","Parameters","--","--","--","--","--","intervals",":","Boolean","Whether","to","plot","95","%","confidence","interval","of","states","Returns","--","--","--","--","--","None","(","plots","data","and","the","fit",")"]
code: def plot_fit(self, intervals=True, **kwargs):
      """Plots the fit of the model
  
      Parameters
      ----------
      intervals : Boolean
          Whether to plot 95% confidence interval of states
  
      Returns
      ----------
      None (plots data and the fit)
      """
      import matplotlib.pyplot as plt
      import seaborn as sns
  
      figsize = kwargs.get("figsize", (10, 7))
      series_type = kwargs.get("series_type", "Smoothed")
  
      if self.latent_variables.estimated is False:
          raise Exception("No latent variables estimated!")
      else:
          date_index = copy.deepcopy(self.index)
          date_index = date_index[
              self.integ : self.data_original.shape[0] + 1
          ]
  
          if series_type == "Smoothed":
              mu, V = self.smoothed_state(
                  self.data, self.latent_variables.get_z_values()
              )
          elif series_type == "Filtered":
              mu, V, _, _, _ = self._model(
                  self.data, self.latent_variables.get_z_values()
              )
          else:
              mu, V = self.smoothed_state(
                  self.data, self.latent_variables.get_z_values()
              )
  
          mu = mu[0][:-1]
          V = V.ravel()
  
          plt.figure(figsize=figsize)
  
          plt.subplot(3, 1, 1)
          plt.title(self.data_name + " Raw and " + series_type)
  
          if intervals == True:
              alpha = [0.15 * i / float(100) for i in range(50, 12, -2)]
              plt.fill_between(
                  date_index[2:],
                  mu[2:] + 1.98 * np.sqrt(V[:-1][2:]),
                  mu[2:] - 1.98 * np.sqrt(V[:-1][2:]),
                  alpha=0.15,
                  label="95% C.I.",
              )
  
          plt.plot(date_index, self.data, label="Data")
          plt.plot(date_index, mu, label=series_type, c="black")
          plt.legend(loc=2)
  
          plt.subplot(3, 1, 2)
          plt.title(self.data_name + " Local Level")
  
          if intervals == True:
              alpha = [0.15 * i / float(100) for i in range(50, 12, -2)]
              plt.fill_between(
                  date_index[2:],
                  mu[2:] + 1.98 * np.sqrt(V[:-1][2:]),
                  mu[2:] - 1.98 * np.sqrt(V[:-1][2:]),
                  alpha=0.15,
                  label="95% C.I.",
              )
  
          plt.plot(date_index, mu, label="Local Level")
          plt.legend(loc=2)
          plt.subplot(3, 1, 3)
          plt.title("Measurement Noise")
          plt.plot(date_index, self.data - mu)
          plt.show()
  
imports: import copy
  import sys
  import numpy
  import pandas
  import scipy.stats
  from ..None import families
  from ..None import tsm
  from ..None import data_check
  from .kalman import *
label_desc: Use image node_id 9 for calling the LLEV obj's underlying member method code with example usage: obj.plot_fit(intervals) without return types