Is H2O target mean encoding available in Python?

痴心易碎 提交于 2019-12-06 02:23:47

Like this:

from h2o.targetencoder import TargetEncoder

# Fit target encoding on training data
targetEncoder = TargetEncoder(x= ["addr_state", "purpose"], y = "bad_loan", fold_column = "cv_fold_te")
targetEncoder.fit(ext_train)

But this requires version at least 3.22

Here is a link to an example: https://github.com/h2oai/h2o-tutorials/blob/78c3766741e8cbbbd8db04d54b1e34f678b85310/best-practices/feature-engineering/feature_engineering.ipynb

And the link to code itself: https://github.com/h2oai/h2o-3/blob/master/h2o-py/h2o/targetencoder.py

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!