def cluster(self): for i in range(self.numberOfClusters): self.means.append( VectorGenerator.getRandomGaussianUnitVector( len(self.vectors[0]), 4, 1).values()) clusterer = cluster.EMClusterer(self.means, bias=0.1) return clusterer.cluster(self.vectors, True, trace=True)
def getGaussianUnitVector(): VectorGenerator.getRandomGaussianUnitVector(10, 0, 1) if __name__ == '__main__':
def cluster(self): for i in range(self.numberOfClusters): self.means.append(VectorGenerator.getRandomGaussianUnitVector(len(self.vectors[0]), 4, 1).values()) clusterer = cluster.EMClusterer(self.means, bias=0.1) return clusterer.cluster(self.vectors, True, trace=True)
def getGaussianUnitVector(): VectorGenerator.getRandomGaussianUnitVector(10, 0, 1)