MCPcopy Index your code
hub / github.com/clips/pattern / test_boxplot

Method test_boxplot

test/test_metrics.py:291–301  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

289 return "pattern.metrics.quantile()"
290
291 def test_boxplot(self):
292 # Different a,b,c,d quantile parameters produce different results.
293 # By approximation, assert (53, 79.5, 84.5, 92, 98).
294 a = [79,53,82,91,87,98,80,93]
295 v = metrics.boxplot(a)
296 self.assertEqual(v[0], min(a))
297 self.assertTrue(abs(v[1] - 79.5) <= 0.5)
298 self.assertTrue(abs(v[2] - metrics.median(a)) <= 0.5)
299 self.assertTrue(abs(v[3] - 92.0) <= 0.5)
300 self.assertEqual(v[4], max(a))
301 print "pattern.metrics.boxplot()"
302
303 def test_fisher_test(self):
304 # Assert Fisher exact test significance.

Callers

nothing calls this directly

Calls 1

absFunction · 0.50

Tested by

no test coverage detected