(self)
Print a report of the fit results.
Print a report of the fit results.
Print a report of the fit results .
def report_fit(self):
        """
        Print a report of the fit results.

        """
        if not self.fitted:
            print('Model not yet fit.')
            return

        print('R-Squared: {0:.3f}'.format(self.model_fit.rsquared))
        print('Adj. R-Squared: {0:.3f}'.format(self.model_fit.rsquared_adj))
        print('')

        tbl = PrettyTable(
            ['Component', ])
        tbl = PrettyTable()

        tbl.add_column('Component', self.fit_parameters.index.values)
        for col in ('Coefficient', 'Std. Error', 'T-Score'):
            tbl.add_column(col, self.fit_parameters[col].values)

        tbl.align['Component'] = 'l'
        tbl.float_format = '.3'

        print(tbl)
def report_fit ( self ) : if not self . fitted : print ( 'Model not yet fit.' ) return print ( 'R-Squared: {0:.3f}' . format ( self . model_fit . rsquared ) ) print ( 'Adj. R-Squared: {0:.3f}' . format ( self . model_fit . rsquared_adj ) ) print ( '' ) tbl = PrettyTable ( [ 'Component' , ] ) tbl = PrettyTable ( ) tbl . add_column ( 'Component' , self . fit_parameters . index . values ) for col in ( 'Coefficient' , 'Std. Error' , 'T-Score' ) : tbl . add_column ( col , self . fit_parameters [ col ] . values ) tbl . align [ 'Component' ] = 'l' tbl . float_format = '.3' print ( tbl )