caporaso-lab / sourcetracker2

SourceTracker2
BSD 3-Clause "New" or "Revised" License
62 stars 45 forks source link

test addition #61

Closed wdwvt1 closed 8 years ago

wdwvt1 commented 8 years ago

@gregcaporaso and I pair reviewed and decided there are a couple keys places where test coverage should be improved.

from scipy.stats import ttest_1samp
st1_ms = np.array([[.3, .4, .3],[.2, .3, .5]])
st2_ms = gibbs(source, sinks)

obs_t, obs_p = ttest_1samp(st2_ms, st1_ms.mean(0))
p_threshhold = .05
self.assertTrue(obs_p > p_threshhold)
wdwvt1 commented 8 years ago

The pr #67 adds the consistency tests. Working on adding the hand rolled examples now.