[Scipy-svn] r5019 - trunk/scipy/cluster/tests

scipy-svn@scip... scipy-svn@scip...
Fri Nov 7 15:52:07 CST 2008


Author: damian.eads
Date: 2008-11-07 15:52:04 -0600 (Fri, 07 Nov 2008)
New Revision: 5019

Added:
   trunk/scipy/cluster/tests/Q-X.txt
Removed:
   trunk/scipy/cluster/tests/fclusterdata-X.txt
Modified:
   trunk/scipy/cluster/tests/test_hierarchy.py
Log:
Renamed test data file because its use is more generic than just testing flat clustering.

Copied: trunk/scipy/cluster/tests/Q-X.txt (from rev 5011, trunk/scipy/cluster/tests/fclusterdata-X.txt)

Deleted: trunk/scipy/cluster/tests/fclusterdata-X.txt
===================================================================
--- trunk/scipy/cluster/tests/fclusterdata-X.txt	2008-11-07 21:48:41 UTC (rev 5018)
+++ trunk/scipy/cluster/tests/fclusterdata-X.txt	2008-11-07 21:52:04 UTC (rev 5019)
@@ -1,30 +0,0 @@
-   5.2656366e-01   3.1416019e-01   8.0065637e-02
-   7.5020518e-01   4.6029983e-01   8.9869646e-01
-   6.6546123e-01   6.9401142e-01   9.1046570e-01
-   9.6404759e-01   1.4308220e-03   7.3987422e-01
-   1.0815906e-01   5.5302879e-01   6.6380478e-02
-   9.3135913e-01   8.2542491e-01   9.5231544e-01
-   6.7808696e-01   3.4190397e-01   5.6148195e-01
-   9.8273094e-01   7.0460521e-01   8.7097863e-02
-   6.1469161e-01   4.6998923e-02   6.0240645e-01
-   5.8016126e-01   9.1735497e-01   5.8816385e-01
-   1.3824631e+00   1.9635816e+00   1.9443788e+00
-   2.1067586e+00   1.6714873e+00   1.3485448e+00
-   1.3988007e+00   1.6614205e+00   1.3222455e+00
-   1.7141046e+00   1.4917638e+00   1.4543217e+00
-   1.5410234e+00   1.8437495e+00   1.6465895e+00
-   2.0851248e+00   1.8452435e+00   2.1734085e+00
-   1.3074874e+00   1.5380165e+00   2.1600774e+00
-   1.4144770e+00   1.9932907e+00   1.9910742e+00
-   1.6194349e+00   1.4770328e+00   1.8978816e+00
-   1.5988060e+00   1.5498898e+00   1.5756335e+00
-   3.3724738e+00   2.6963531e+00   3.3998170e+00
-   3.1370512e+00   3.3652809e+00   3.0608907e+00
-   3.2941325e+00   3.1961950e+00   2.9070017e+00
-   2.6551051e+00   3.0678590e+00   2.9719854e+00
-   3.3094104e+00   2.5928397e+00   2.5771411e+00
-   2.5955722e+00   3.3347737e+00   3.0879319e+00
-   2.5820618e+00   3.4161567e+00   3.2644199e+00
-   2.7112700e+00   2.7703245e+00   2.6346650e+00
-   2.7961785e+00   3.2547372e+00   3.4180156e+00
-   2.6474175e+00   2.5453804e+00   3.2535411e+00

Modified: trunk/scipy/cluster/tests/test_hierarchy.py
===================================================================
--- trunk/scipy/cluster/tests/test_hierarchy.py	2008-11-07 21:48:41 UTC (rev 5018)
+++ trunk/scipy/cluster/tests/test_hierarchy.py	2008-11-07 21:52:04 UTC (rev 5019)
@@ -54,7 +54,7 @@
 eo = {}
 
 _filenames = ["iris.txt",
-              "fclusterdata-X.txt",
+              "Q-X.txt",
               "fclusterdata-maxclusts-2.txt",
               "fclusterdata-maxclusts-3.txt",
               "fclusterdata-maxclusts-4.txt",
@@ -167,7 +167,7 @@
     ################### linkage on Q
     def test_linkage_single_q(self):
         "Tests linkage(Y, 'single') on the Q data set."
-        X = eo['fclusterdata-X']
+        X = eo['Q-X']
         Z = single(X)
         Zmlab = eo['linkage-Q-single']
         eps = 1e-06
@@ -177,7 +177,7 @@
 
     def test_linkage_complete_q(self):
         "Tests linkage(Y, 'complete') on the Q data set."
-        X = eo['fclusterdata-X']
+        X = eo['Q-X']
         Z = complete(X)
         Zmlab = eo['linkage-Q-complete']
         eps = 1e-07
@@ -187,7 +187,7 @@
 
     def test_linkage_centroid_q(self):
         "Tests linkage(Y, 'centroid') on the Q data set."
-        X = eo['fclusterdata-X']
+        X = eo['Q-X']
         Z = centroid(X)
         Zmlab = eo['linkage-Q-centroid']
         eps = 1e-07
@@ -197,7 +197,7 @@
 
     def test_linkage_weighted_q(self):
         "Tests linkage(Y, 'weighted') on the Q data set."
-        X = eo['fclusterdata-X']
+        X = eo['Q-X']
         Z = weighted(X)
         Zmlab = eo['linkage-Q-weighted']
         eps = 1e-07
@@ -304,28 +304,28 @@
     def test_fclusterdata_maxclusts_2(self):
         "Tests fclusterdata(X, criterion='maxclust', t=2) on a random 3-cluster data set."
         expectedT = eo['fclusterdata-maxclusts-2']
-        X = eo['fclusterdata-X']
+        X = eo['Q-X']
         T = fclusterdata(X, criterion='maxclust', t=2)
         self.failUnless(is_isomorphic(T, expectedT))
 
     def test_fclusterdata_maxclusts_3(self):
         "Tests fclusterdata(X, criterion='maxclust', t=3) on a random 3-cluster data set."
         expectedT = eo['fclusterdata-maxclusts-3']
-        X = eo['fclusterdata-X']
+        X = eo['Q-X']
         T = fclusterdata(X, criterion='maxclust', t=3)
         self.failUnless(is_isomorphic(T, expectedT))
 
     def test_fclusterdata_maxclusts_4(self):
         "Tests fclusterdata(X, criterion='maxclust', t=4) on a random 3-cluster data set."
         expectedT = eo['fclusterdata-maxclusts-4']
-        X = eo['fclusterdata-X']
+        X = eo['Q-X']
         T = fclusterdata(X, criterion='maxclust', t=4)
         self.failUnless(is_isomorphic(T, expectedT))
 
     def test_fcluster_maxclusts_2(self):
         "Tests fcluster(Z, criterion='maxclust', t=2) on a random 3-cluster data set."
         expectedT = eo['fclusterdata-maxclusts-2']
-        X = eo['fclusterdata-X']
+        X = eo['Q-X']
         Y = pdist(X)
         Z = linkage(Y)
         T = fcluster(Z, criterion='maxclust', t=2)
@@ -334,7 +334,7 @@
     def test_fcluster_maxclusts_3(self):
         "Tests fcluster(Z, criterion='maxclust', t=3) on a random 3-cluster data set."
         expectedT = eo['fclusterdata-maxclusts-3']
-        X = eo['fclusterdata-X']
+        X = eo['Q-X']
         Y = pdist(X)
         Z = linkage(Y)
         T = fcluster(Z, criterion='maxclust', t=3)
@@ -343,7 +343,7 @@
     def test_fcluster_maxclusts_4(self):
         "Tests fcluster(Z, criterion='maxclust', t=4) on a random 3-cluster data set."
         expectedT = eo['fclusterdata-maxclusts-4']
-        X = eo['fclusterdata-X']
+        X = eo['Q-X']
         Y = pdist(X)
         Z = linkage(Y)
         T = fcluster(Z, criterion='maxclust', t=4)



More information about the Scipy-svn mailing list