From 1f39621c3d5aa83b6eca769688937101b49cf95e Mon Sep 17 00:00:00 2001 From: "pancaldi.paolo" Date: Wed, 11 Mar 2009 14:31:34 +0000 Subject: [PATCH] nothing of important (new function for building a file's coordinate) --- pcluster.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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:]] -- 2.26.2