Permalink
Browse files

ENH: use GNB() instead of some sample_clf_lin to robustify the test

otherwise we get sporadic failures while building packages.  GNB()
is analytic/deterministic so should be reproducible
  • Loading branch information...
1 parent c4c0138 commit 828f4b4bea2488f8c7e3f6c2446a445d77325338 @yarikoptic yarikoptic committed Jun 29, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 mvpa2/tests/test_searchlight.py
@@ -158,7 +158,7 @@ def test_partial_searchlight_with_full_report(self):
center_ids[[3,50]] = True
ds.fa['center_ids'] = center_ids
# compute N-1 cross-validation for each sphere
- cv = CrossValidation(sample_clf_lin, NFoldPartitioner())
+ cv = CrossValidation(GNB(), NFoldPartitioner())
# contruct diameter 1 (or just radius 0) searchlight
# one time give center ids as a list, the other one takes it from the
# dataset itself
@@ -175,7 +175,7 @@ def test_partial_searchlight_with_full_report(self):
# only two spheres but error for all CV-folds
self.assertEqual(results.shape, (len(self.dataset.UC), 2))
# Test if results hold if we "set" a "new" datameasure
- sl.datameasure = CrossValidation(sample_clf_lin, NFoldPartitioner())
+ sl.datameasure = CrossValidation(GNB(), NFoldPartitioner())
results2 = sl(ds)
assert_array_almost_equal(results, results2)

0 comments on commit 828f4b4

Please sign in to comment.