def plot_fit(self, **kwargs):
        """ 
        Plots the fit of the model against the data
        """

        import matplotlib.pyplot as plt
        import seaborn as sns

        figsize = kwargs.get('figsize',(10,7))
        plt.figure(figsize=figsize)
        date_index = self.index[self.ar:self.data.shape[0]]
        mu, Y = self._model(self.latent_variables.get_z_values())
        plt.plot(date_index,Y,label='Data')
        plt.plot(date_index,mu,label='Filter',c='black')
        plt.title(self.data_name)
        plt.legend(loc=2)   
        plt.show()
def plot_fit ( self , ** kwargs ) : import matplotlib . pyplot as plt import seaborn as sns figsize = kwargs . get ( 'figsize' , ( 10 , 7 ) ) plt . figure ( figsize = figsize ) date_index = self . index [ self . ar : self . data . shape [ 0 ] ] mu , Y = self . _model ( self . latent_variables . get_z_values ( ) ) plt . plot ( date_index , Y , label = 'Data' ) plt . plot ( date_index , mu , label = 'Filter' , c = 'black' ) plt . title ( self . data_name ) plt . legend ( loc = 2 ) plt . show ( )
Plots the fit of the model against the data