def job_hotelling(sample_source, tr, te, r): """Hotelling T-squared test""" with util.ContextTimer() as t: htest = tst.HotellingT2Test(alpha=alpha) result = htest.perform_test(te) return {'test_method': htest, 'test_result': result, 'time_secs': t.secs}
def job_hotelling(prob_label, tr, te, r, ni, n): """Hotelling T-squared test""" with util.ContextTimer() as t: htest = tst.HotellingT2Test(alpha=alpha) test_result = htest.perform_test(te) return { 'test_method': htest, 'test_result': test_result, 'time_secs': t.secs }
def job_hotelling(sample_source, tr, te, r): """Hotelling T-squared test""" # Since text data are high-d, T-test will likely cause a LinAlgError because # of the singular covariance matrix. htest = tst.HotellingT2Test(alpha=alpha) try: test_result = htest.perform_test(te) except np.linalg.linalg.LinAlgError: test_result = {'alpha': alpha, 'pvalue': 1.0, 'test_stat': 1e-5, 'h0_rejected': False} result = {'test_method': htest, 'test_result': test_result} return result
def job_hotelling(sample_source, tr, te, r): """Hotelling T-squared test""" htest = tst.HotellingT2Test(alpha=alpha) return htest.perform_test(te)
def job_hotelling(prob_label, tr, te, r, ni, n): """Hotelling T-squared test""" htest = tst.HotellingT2Test(alpha=alpha) return htest.perform_test(te)