X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fanalysis%2Fscoremodels%2FFeatureDistanceModelTest.java;h=0577fae0760565c78f6ace488fa561e9926f8214;hb=refs%2Fheads%2Fbug%2FJAL-2515;hp=02e64b6d0f77f874a04c44bc9122c1908a23e178;hpb=aba253e57b22ce7d1f4fe376935e42aeb4f6d591;p=jalview.git diff --git a/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java b/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java index 02e64b6..0577fae 100644 --- a/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java +++ b/test/jalview/analysis/scoremodels/FeatureDistanceModelTest.java @@ -264,11 +264,9 @@ public class FeatureDistanceModelTest assertEquals(distances.getValue(0, 0), 0d); assertEquals(distances.getValue(1, 1), 0d); - // these left to fail pending resolution of - // JAL-2424 (computing score as 5/6, should be 5/5) - // see also PCATest.testComputeSimilarity_featureDistances() - assertEquals(distances.getValue(0, 1), 1f, "JAL-2424!"); - assertEquals(distances.getValue(1, 0), 1f); + assertEquals(distances.getValue(0, 1), 1d, + "expected identical pairs. (check normalisation for similarity score)"); + assertEquals(distances.getValue(1, 0), 1d); } /** @@ -293,23 +291,21 @@ public class FeatureDistanceModelTest /* * include gaps * score = 3 + 3 + 0 + 2 + 3 + 2 = 13/6 - // FIXME out by 1 error in cpwidth JAL-2424 - dividing by 7 */ SimilarityParamsI params = new SimilarityParams(true, true, true, true); MatrixI distances = sm.findDistances(view, params); assertEquals(distances.getValue(0, 0), 0d); assertEquals(distances.getValue(1, 1), 0d); - assertEquals(distances.getValue(0, 1), 13d / 7); // should be 13d/6 - assertEquals(distances.getValue(1, 0), 13d / 7); + assertEquals(distances.getValue(0, 1), 13d / 6); // should be 13d/6 + assertEquals(distances.getValue(1, 0), 13d / 6); /* * exclude gaps * score = 3 + 3 + 0 + 0 + 0 + 0 = 6/6 - // FIXME out by 1 error in cpwidth JAL-2424 - dividing by 7 */ params = new SimilarityParams(true, true, false, true); distances = sm.findDistances(view, params); - assertEquals(distances.getValue(0, 1), 6d / 7);// should be 6d/6 + assertEquals(distances.getValue(0, 1), 6d / 6);// should be 6d/6 } /**