From: pancaldi.paolo Date: Wed, 11 Mar 2009 14:31:34 +0000 (+0000) Subject: nothing of important (new function for building a file's coordinate) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c7c6c081d6e50232cc1e0138c84f7d38f35abb39;p=hooke.git nothing of important (new function for building a file's coordinate) --- diff --git a/pcluster.py b/pcluster.py index 4a14a9a..ba27404 100644 --- a/pcluster.py +++ b/pcluster.py @@ -360,16 +360,9 @@ class pclusterCommands: # array convert, calculate PCA, transpose self.pca_myArray = np.array(self.pca_myArray,dtype='float') print self.pca_myArray.shape - '''for i in range(len(self.pca_myArray)): - print i, self.pca_paths[i] - print i, self.pca_myArray[i]''' self.pca_myArray = pca(self.pca_myArray, output_dim=2) #other way -> y = mdp.nodes.PCANode(output_dim=2)(gigi) myArrayTr = np.transpose(self.pca_myArray) - '''for i in range(len(self.pca_myArray)): - print i, self.pca_paths[i] - print i, self.pca_myArray[i]''' - # plotting X=myArrayTr[0] Y=myArrayTr[1] @@ -377,6 +370,12 @@ class pclusterCommands: X=list(X) Y=list(Y) + '''#builds coordinate s file + f = open('coordinate_punti.txt','w') + for i in range(len(X)): + f.write (str(i) + "\t" + str(X[i]) + "\t" + str(Y[i]) + "\n") + f.close() + ''' clustplot=lhc.PlotObject() @@ -392,7 +391,8 @@ class pclusterCommands: Xbad=[] Ybad=[] - goodnamefile=open('/home/massimo/python/hooke/dataset_clust/roslin_blind50.log','r') + goodnamefile=open('roslin_blind50.log','r') + #goodnamefile=open('/home/massimo/python/hooke/dataset_clust/roslin_blind50.log','r') goodnames=goodnamefile.readlines() goodnames=[i.split()[0] for i in goodnames[1:]]