def test_ordinal_mcrank(): gb = GradientBoostingClassifier(n_estimators=10, loss="deviance", random_state=0) mc = OrdinalMcRank(gb) mc.fit(X, y) assert_almost_equal(mc.score(X, y), 48.62, 2)
def test_ordinal_mcrank(): gb = GradientBoostingClassifier(n_estimators=10, loss="deviance", random_state=0) mc = OrdinalMcRank(gb) mc.fit(X, y) assert_almost_equal(mc.score(X, y), 48.62, 2)
def test_ordinal_mcrank_warm_start(): gb = GradientBoostingClassifier(n_estimators=5, loss="deviance", warm_start=True, random_state=0) mc = OrdinalMcRank(gb) mc.fit(X, y) assert_almost_equal(mc.score(X, y), 56.35, 2) mc.set_params(estimator__n_estimators=10) mc.fit(X, y) assert_almost_equal(mc.score(X, y), 48.62, 2)
def test_ordinal_mcrank_warm_start(): gb = GradientBoostingClassifier(n_estimators=5, loss="deviance", warm_start=True, random_state=0) mc = OrdinalMcRank(gb) mc.fit(X, y) assert_almost_equal(mc.score(X, y), 56.35, 2) mc.set_params(estimator__n_estimators=10) mc.fit(X, y) assert_almost_equal(mc.score(X, y), 48.62, 2)