def test_fit_normal_dict(): fit_ = st.fit(NORMAL, "norm") d = st.fit_results_to_dict(fit_, min_bound=-123, max_bound=123) nt.assert_almost_equal(d["mu"], NORMAL_MU, 1) nt.assert_almost_equal(d["sigma"], NORMAL_SIGMA, 1) nt.assert_almost_equal(d["min"], -123, 1) nt.assert_almost_equal(d["max"], 123, 1)
def test_fit_normal_dict(): fit_ = st.fit(NORMAL, 'norm') d = st.fit_results_to_dict(fit_, min_bound=-123, max_bound=123) nt.assert_almost_equal(d['mu'], NORMAL_MU, 1) nt.assert_almost_equal(d['sigma'], NORMAL_SIGMA, 1) nt.assert_almost_equal(d['min'], -123, 1) nt.assert_almost_equal(d['max'], 123, 1)
def test_fit_normal_dict(): fit_ = st.fit(NORMAL, 'norm') d = st.fit_results_to_dict(fit_, min_bound=-123, max_bound=123) assert_almost_equal(d['mu'], NORMAL_MU, 1) assert_almost_equal(d['sigma'], NORMAL_SIGMA, 1) assert_almost_equal(d['min'], -123, 1) assert_almost_equal(d['max'], 123, 1)
def test_fit_default_is_normal(): fit0_ = st.fit(NORMAL) fit1_ = st.fit(NORMAL, 'norm') nt.eq_(fit0_.params, fit1_.params) nt.eq_(fit0_.errs, fit1_.errs)
def test_fit_normal_regression(): fit_ = st.fit(NORMAL, 'norm') nt.assert_almost_equal(fit_.params[0], 10.019332055822, 12) nt.assert_almost_equal(fit_.params[1], 0.978726207747, 12) nt.assert_almost_equal(fit_.errs[0], 0.021479979161, 12) nt.assert_almost_equal(fit_.errs[1], 0.745431659944, 12)
def test_fit_normal_params(): fit_ = st.fit(NORMAL, 'norm') nt.assert_almost_equal(fit_.params[0], NORMAL_MU, 1) nt.assert_almost_equal(fit_.params[1], NORMAL_SIGMA, 1)
def test_fit_default_is_normal(): fit0_ = st.fit(NORMAL) fit1_ = st.fit(NORMAL, 'norm') nt.assert_items_equal(fit0_.params, fit1_.params) nt.assert_items_equal(fit0_.errs, fit1_.errs)
def test_fit_default_is_normal(): fit0_ = st.fit(NORMAL) fit1_ = st.fit(NORMAL, 'norm') assert fit0_.params == fit1_.params assert fit0_.errs == fit1_.errs
def test_fit_normal_regression(): fit_ = st.fit(NORMAL, 'norm') assert_almost_equal(fit_.params[0], 10.019332055822, 12) assert_almost_equal(fit_.params[1], 0.978726207747, 12) assert_almost_equal(fit_.errs[0], 0.021479979161, 12) assert_almost_equal(fit_.errs[1], 0.7369569123250506, 12)
def test_fit_normal_params(): fit_ = st.fit(NORMAL, 'norm') assert_almost_equal(fit_.params[0], NORMAL_MU, 1) assert_almost_equal(fit_.params[1], NORMAL_SIGMA, 1)