Пример #1
0
    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
Пример #2
0
    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
Пример #3
0
    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
Пример #4
0
    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
Пример #5
0
    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
Пример #6
0
    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
Пример #7
0
    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
Пример #8
0
    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
Пример #9
0
    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
Пример #10
0
    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