Implementing custom stopping metrics to optimize during training in H2O model directly from R

房东的猫 提交于 2019-11-30 15:07:47

Currently there is only backend support for Python-based custom functions, which can be uploaded to the backend via the h2o.upload_custom_metric() function. This function will then return a function reference (this is a string that has a naming convention format of 'language:keyName=funcName'). That you can then pass to the custom_metric parameter.

For example:

custom_mm_func = h2o.upload_custom_metric(CustomRmseFunc, func_name="rmse", func_file="mm_rmse.py")

returns a function reference which has the following value:

> print(custom_mm_func)
python:rmse=mm_rmse.CustomRmseFuncWrapper

As for your second question about using the custom metric as a stopping metric, there is a jira ticket that you can follow here: https://0xdata.atlassian.net/browse/PUBDEV-5261

You can find more details on how to use the custom metric here.

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