def __str__(self): s = 30*'-' s += '\nData object: ' + self.name + '\n' s += '\t' + str(size(self.X,1)) + ' Examples\n' s += '\t' + str(size(self.X,0)) + ' Dimension(s)\n' if len(self.history) > 0: s += '\nHistory:\n' s += displayHistoryRec(self.history) s += 30*'-' + '\n' return s
def __str__(self): s = 30 * '-' s += '\nData object: ' + self.name + '\n' s += '\t' + str(size(self.X, 1)) + ' Examples\n' s += '\t' + str(size(self.X, 0)) + ' Dimension(s)\n' if len(self.history) > 0: s += '\nHistory:\n' s += displayHistoryRec(self.history) s += 30 * '-' + '\n' return s
def __str__(self): """ Returns a string representation of the NonlinearTransform object. :returns: A string representation of the NonlinearTransform object. :rtype: string """ s = 30 * '-' s += '\nNonlinear Transform: ' + self.name + '\n' if len(self.history) > 0: s += displayHistoryRec(self.history) s += 30 * '-' return s
def html(self): """ Returns an html representation of itself. This is required by LogToken which LinearTransform inherits from. :returns: html preprentation the LinearTransform object :rtype: string """ s = "<table border=\"0\"rules=\"groups\" frame=\"box\">\n" s += "<thead><tr><td colspan=\"2\"><tt><b>Nonlinear Transform: %s</b></tt></td></tr></thead>\n" % (self.name,) s += "<tbody>" s += "<tr><td valign=\"top\"><tt>History: </tt></td><td><pre>" if len(self.history) > 0: s += displayHistoryRec(self.history) s += "</pre></td></tr></table>" return s
def __str__(self): """ Returns a string representation of the NonlinearTransform object. :returns: A string representation of the NonlinearTransform object. :rtype: string """ s = 30*'-' s += '\nNonlinear Transform: ' + self.name + '\n' if len(self.history) > 0: s += displayHistoryRec(self.history) s += 30*'-' return s
def __str__(self): """ Returns a string representation of the LinearTransform object. :returns: A string representation of the LinearTransform object. :rtype: string """ sh = string.join([str(elem) for elem in list(shape(self.W))], ' X ') s = 30 * '-' s += '\nLinear Transform (' + sh + '): ' + self.name + '\n' if len(self.history) > 0: s += displayHistoryRec(self.history) s += 30 * '-' return s
def __str__(self): """ Returns a string representation of the LinearTransform object. :returns: A string representation of the LinearTransform object. :rtype: string """ sh = string.join([str(elem) for elem in list(shape(self.W))],' X ') s = 30*'-' s += '\nLinear Transform (' + sh + '): ' + self.name + '\n' if len(self.history) > 0: s += displayHistoryRec(self.history) s += 30*'-' return s
def html(self): """ Returns an html representation of itself. This is required by LogToken which LinearTransform inherits from. :returns: html preprentation the LinearTransform object :rtype: string """ s = "<table border=\"0\"rules=\"groups\" frame=\"box\">\n" s += "<thead><tr><td colspan=\"2\"><tt><b>Nonlinear Transform: %s</b></tt></td></tr></thead>\n" % ( self.name, ) s += "<tbody>" s += "<tr><td valign=\"top\"><tt>History: </tt></td><td><pre>" if len(self.history) > 0: s += displayHistoryRec(self.history) s += "</pre></td></tr></table>" return s
def html(self): """ Returns an html representation of the Data object. The function is required by LogToken from which Data inherits. :returns: html representation of Data object :rtype: string """ s = "<table border=\"0\"rules=\"groups\" frame=\"box\">\n" s += "<thead><tr><td colspan=\"2\"><tt><b>Data: %s</b></tt></td></tr></thead>\n" % (self.name,) s += "<tbody>" s += "<tr><td><tt>Examples: </tt></td><td><tt>%i</tt></td></tr>" % (self.X.shape[1],) s += "<tr><td><tt>Dimensions: </tt></td><td><tt>%i</tt></td></tr>" % (self.X.shape[0],) s += "<tr><td valign=\"top\"><tt>History: </tt></td><td><pre>" if len(self.history) > 0: s += displayHistoryRec(self.history) s += "</pre></td></tr></table>" return s
def html(self): """ Returns an html representation of the Data object. The function is required by LogToken from which Data inherits. :returns: html representation of Data object :rtype: string """ s = "<table border=\"0\"rules=\"groups\" frame=\"box\">\n" s += "<thead><tr><td colspan=\"2\"><tt><b>Data: %s</b></tt></td></tr></thead>\n" % ( self.name, ) s += "<tbody>" s += "<tr><td><tt>Examples: </tt></td><td><tt>%i</tt></td></tr>" % ( self.X.shape[1], ) s += "<tr><td><tt>Dimensions: </tt></td><td><tt>%i</tt></td></tr>" % ( self.X.shape[0], ) s += "<tr><td valign=\"top\"><tt>History: </tt></td><td><pre>" if len(self.history) > 0: s += displayHistoryRec(self.history) s += "</pre></td></tr></table>" return s