def summarize(self, out=sys.stdout):
        """Prints a summary of the cluster info

        """
        out.write(u"Cluster of %s centroids\n\n" % len(self.centroids))

        out.write(u"Data distribution:\n")
        print_distribution(self.get_data_distribution(), out=out)
        out.write(u"\n\n")
        centroids_list = sorted(self.centroids, key=lambda x: x.name)

        out.write(u"Centroids features:\n")
        for centroid in centroids_list:
            out.write(utf8(u"\n%s: " % centroid.name))
            connector = ""
            for field_id, value in centroid.center.items():
                if isinstance(value, basestring):
                    value = u"\"%s\"" % value
                out.write(utf8(u"%s%s: %s" % (connector,
                                              self.fields[field_id]['name'],
                                              value)))
                connector = ", "
        out.write(u"\n\n")

        out.write(u"Data distance statistics:\n\n")
        for centroid in centroids_list:
            centroid.print_statistics(out=out)

        if len(self.centroids) > 1:
            out.write(u"Intercentroids distance:\n\n")
            for centroid in centroids_list:
                out.write(utf8(u"To centroid: %s\n" % centroid.name))
                for measure, result in self.centroids_distance(centroid):
                    out.write(u"%s%s: %s\n" % (INDENT, measure, result))
                out.write(u"\n")
dataset/ETHPy150Open bigmlcom/python/bigml/cluster.py/Cluster.summarize/original