test_core.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:dask-xgboost 作者: dask 项目源码 文件源码
def test_classifier(loop):  # noqa
    with cluster() as (s, [a, b]):
        with Client(s['address'], loop=loop):
            a = dxgb.XGBClassifier()
            X2 = da.from_array(X, 5)
            y2 = da.from_array(y, 5)
            a.fit(X2, y2)
            p1 = a.predict(X2)

    b = xgb.XGBClassifier()
    b.fit(X, y)
    np.testing.assert_array_almost_equal(a.feature_importances_,
                                         b.feature_importances_)
    assert_eq(p1, b.predict(X))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号