Plots the fit of the model against the data
161042
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()
786441
def plot(self, **kwargs):
        
        set_kwargs_drawstyle(kwargs, "default")
        return _plot_estimate(
            self, estimate=getattr(self, self._estimate_name), confidence_intervals=self.confidence_interval_, **kwargs
        )
542179
def fit(self, X, *args, **kwargs):
        

        self.constant_value = self._get_constant_value(X)

        if self.constant_value is None:
            if self.unfittable_model:
                self.model = getattr(scipy.stats, self.model_class)(*args, **kwargs)
            else:
                self.model = getattr(scipy.stats, self.model_class)(X, *args, **kwargs)

            for name in self.METHOD_NAMES:
                attribute = getattr(self.__class__, name)
                if isinstance(attribute, str):
                    setattr(self, name, getattr(self.model, attribute))

                elif attribute is None:
                    setattr(self, name, missing_method_scipy_wrapper(lambda x: x))

        else:
            self._replace_constant_methods()

        self.fitted = True
597556
def plot(self):
		'''
		
		'''
		pl.plot(self.x, self.y, '.')
		pl.plot(self.x_int, self.y_int)
		pl.grid(True)
		pl.show()
193451
def fit(self, x):
        
        assert x.ndim > 1
        self.data_min_ = np.min(x, axis=tuple(range(x.ndim - 1)))
        self.data_max_ = np.max(x, axis=tuple(range(x.ndim - 1)))

        if self.share_knots:
            self.data_min_[:] = np.min(self.data_min_)
            self.data_max_[:] = np.max(self.data_max_)
11801
def fit(self, X, y=None):
        
        return self.partial_fit(np.concatenate(X, axis=0))
103059
def plot_stats(statistics, ylog=False, view=False, filename='avg_fitness.svg'):
    
    if plt is None:
        warnings.warn("This display is not available due to a missing optional dependency (matplotlib)")
        return

    generation = range(len(statistics.most_fit_genomes))
    best_fitness = [c.fitness for c in statistics.most_fit_genomes]
    avg_fitness = np.array(statistics.get_fitness_mean())
    stdev_fitness = np.array(statistics.get_fitness_stdev())

    plt.plot(generation, avg_fitness, 'b-', label="average")
    plt.plot(generation, avg_fitness - stdev_fitness, 'g-.', label="-1 sd")
    plt.plot(generation, avg_fitness + stdev_fitness, 'g-.', label="+1 sd")
    plt.plot(generation, best_fitness, 'r-', label="best")

    plt.title("Population's average and best fitness")
    plt.xlabel("Generations")
    plt.ylabel("Fitness")
    plt.grid()
    plt.legend(loc="best")
    if ylog:
        plt.gca().set_yscale('symlog')

    plt.savefig(filename)
    if view:
        plt.show()

    plt.close()
101806
def plot_residual(self, x, y1, y2, label1='Raw data', label2='Fit/theory', 
             xlabel=None, ylabel=None, show_legend=True,
             **kws):
        

        panel = self.get_panel('top')
        panel.plot(x, y1, label=label1, **kws)
        panel = self.get_panel('top')
        panel.oplot(x, y2, label=label2, ylabel=ylabel, show_legend=show_legend, **kws)
        panel = self.get_panel('bottom')
        panel.plot(x, (y2-y1), ylabel='residual', show_legend=False, **kws)
        
        if xlabel is not None:
            self.xlabel = xlabel
        if self.xlabel is not None:
            self.panel_bot.set_xlabel(self.xlabel)
526982
def fit(self, X):
        
        if isinstance(X, (pd.Series, pd.DataFrame)):
            self.name = X.name

        self.constant_value = self._get_constant_value(X)

        if self.constant_value is None:
            self.mean = np.mean(X)
            self.std = np.std(X)

        else:
            self._replace_constant_methods()

        self.fitted = True
23885
def plot(self, f, lfilter=None,**kargs):
        """"""

        return plt.plot([ f(i) for i in self.res if not lfilter or lfilter(i) ], **kargs)
864697
def plot_model(self, proj, ax):
        
        x, y = proj
        evaluated_model = self.ig._eval_model()
        y_vals = getattr(evaluated_model, y.name)
        x_vals = self.ig._x_grid[x]
        plot = ax.errorbar(x_vals, y_vals, xerr=0, yerr=0, c='red')
        return plot
710489
def fit_predict(self,
                    X,
                    num_epochs=10,
                    updates_epoch=10,
                    stop_param_updates=dict(),
                    batch_size=1,
                    show_progressbar=False):
        """"""
        self.fit(X,
                 num_epochs,
                 updates_epoch,
                 stop_param_updates,
                 batch_size,
                 show_progressbar)

        return self.predict(X, batch_size=batch_size)
962006
def plot_nb(self,xdata,ydata=[],logScale=False):
        ''''''
        self.plot(xdata,ydata,logScale)
54002
def render(self):
        '''
        '''

        fig, ax = plt.subplots()
        self.data_object._render_plot(ax)
        return fig
1327101
def fit(self, X, y):
        
        self.X = X
        self.y = y
345958
def plot(self):
        """"""
        plt.plot(self.bin_edges, self.hist, self.bin_edges, self.best_pdf)
339802
def fit_plots(ax,xfit,xraw,yfit,yraw):
    '''
    
    '''
    global _yfits_
    _yfits_ = yfit
    ax.plot(xfit, yfit)
    ax.plot(xfit, np.sum(yfit,axis=1))
    ax.scatter(xraw, yraw)
    ax.set_xlabel('Field (log10(mT))')
    ax.set_ylabel('IRM normalization')