(self, step, data=None, array_like=True)
Print debug info to the log
Print debug info to the log
Print debug info to the log
def _print_log(self, step, data=None, array_like=True):
        """
        Print debug info to the log
        """
        
        # Set mode to append to log file
        mode = 'a'
        output = ''

        if step == 1:
            # Output the transformed targets
            output = "Targets transformed"
        elif step == 2:
            # Output sample data after adding lag observations
            output = "Targets inverse transformed"

        if array_like:
            output += " {0}:\nSample Data:\n{1}\n\n".format(data.shape, data.head())
        else:
            output += " {0}".format(data)

        sys.stdout.write(output)
        with open(self.logfile, mode, encoding='utf-8') as f:
            f.write(output)
def _print_log ( self , step , data = None , array_like = True ) : # Set mode to append to log file mode = 'a' output = '' if step == 1 : # Output the transformed targets output = "Targets transformed" elif step == 2 : # Output sample data after adding lag observations output = "Targets inverse transformed" if array_like : output += " {0}:\nSample Data:\n{1}\n\n" . format ( data . shape , data . head ( ) ) else : output += " {0}" . format ( data ) sys . stdout . write ( output ) with open ( self . logfile , mode , encoding = 'utf-8' ) as f : f . write ( output )