22
33import org .forester .evoinference .matrix .distance .BasicSymmetricalDistanceMatrix ;
44import org .forester .phylogeny .Phylogeny ;
5- import org .junit .Ignore ;
65import org .junit .Test ;
76
87import static org .junit .Assert .*;
1615public class TestDistanceTreeEvaluator {
1716
1817 @ Test
19- @ Ignore
2018 public void testErrorFree () throws Exception {
2119
2220 // Create a perfect additive distance matrix
@@ -48,7 +46,6 @@ public void testErrorFree() throws Exception {
4846 }
4947
5048 @ Test
51- @ Ignore
5249 public void testErrorEstimation () throws Exception {
5350
5451 // Matrix taken from forester test
@@ -57,18 +54,18 @@ public void testErrorEstimation() throws Exception {
5754 m .setIdentifier (1 , "B" );
5855 m .setIdentifier (2 , "C" );
5956 m .setIdentifier (3 , "D" );
60- m .setRow ("0.00 0.95 0.17 0.98 " , 0 );
61- m .setRow ("0.95 0.00 1.02 1.83 " , 1 );
62- m .setRow ("0.17 1.02 0.00 1.01 " , 2 );
63- m .setRow ("0.98 1.83 1.01 0.00 " , 3 );
57+ m .setRow ("0 1 0 1 " , 0 );
58+ m .setRow ("1 0 0 1 " , 1 );
59+ m .setRow ("0 0 0 1 " , 2 );
60+ m .setRow ("1 1 1 0 " , 3 );
6461
6562 // Calculate error free tree and get the cv
6663 Phylogeny tree = TreeConstructor .distanceTree (
6764 ForesterWrapper .cloneDM (m ), TreeConstructorType .NJ );
6865 double cv = DistanceTreeEvaluator .evaluate (tree , m );
6966
70- // Assert error is only 5 %
71- assertEquals (0.05 , cv , 0.1 );
67+ // Assert error is about 30 %
68+ assertEquals (0.3 , cv , 0.05 );
7269
7370 }
7471}
0 commit comments