【问题标题】:F1 score for a Random Forest model随机森林模型的 F1 分数
【发布时间】:2019-05-04 03:01:46
【问题描述】:

我已经建立了一个随机森林模型(H2O 库),然后在一些测试数据上检查了它的准确性。我想用 F1 分数作为模型成功的衡量标准。但是,我在文档中找不到检索它的方法。

我知道这是可能的,因为here

performance = best_nn.model_performance(test_data = test)
F1        = performance.F1()

但是,就我而言,由于某种原因,性能没有 F1 作为一种方法。 出了什么问题,如何找回它?

环境:

H2O cluster uptime: 7 mins 29 secs
H2O cluster timezone:   Asia/Jerusalem
H2O data parsing timezone:  UTC
H2O cluster version:    3.22.0.2
H2O cluster version age:    10 days
H2O cluster name:   H2O_from_python_user_24aghd
H2O cluster total nodes:    1
H2O cluster free memory:    894 Mb
H2O cluster total cores:    4
H2O cluster allowed cores:  4
H2O cluster status: locked, healthy
H2O connection url: http://localhost:54321
H2O connection proxy:   None
H2O internal security:  False
H2O API Extensions: Algos, AutoML, Core V3, Core V4
Python version: 2.7.15 final

【问题讨论】:

    标签: random-forest h2o


    【解决方案1】:

    我好像找到了原因,而且比较简单:

    F1 仅适用于具有两个可能的类作为响应变量的模型。我的有更多。

    因此,H2O 并未建议该指标。

    【讨论】:

    • 正确,然后没有定义 F1。您需要使用其他指标,例如对数损失。
    猜你喜欢
    • 2019-07-10
    • 2017-08-11
    • 2016-04-09
    • 2020-02-25
    • 2019-08-02
    • 1970-01-01
    • 2016-01-24
    • 2016-04-02
    • 2019-03-14
    相关资源
    最近更新 更多