nothing of important (new function for building a file's coordinate)
authorpancaldi.paolo <devnull@localhost>
Wed, 11 Mar 2009 14:31:34 +0000 (14:31 +0000)
committerpancaldi.paolo <devnull@localhost>
Wed, 11 Mar 2009 14:31:34 +0000 (14:31 +0000)
pcluster.py

index 4a14a9aef0fb49efd269ac4f92dbd47b72ede8b6..ba27404396e7aac2b07df65cfd2a27fe672e61fd 100644 (file)
@@ -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:]]