How to understand H2OModelMetrics object metrics through h2o.performance

After creating the model using h2o.randomForest, using:

perf <- h2o.performance(model, test)
print(perf)

I get the following information (value of H2OModelMetricsobject)

H2OBinomialMetrics: drf

MSE:  0.1353948
RMSE:  0.3679604
LogLoss:  0.4639761
Mean Per-Class Error:  0.3733908
AUC:  0.6681437
Gini:  0.3362873

Confusion Matrix (vertical: actual; across: predicted) 
for F1-optimal threshold:
          0    1    Error        Rate
0      2109 1008 0.323388  =1008/3117
1       257  350 0.423394    =257/607
Totals 2366 1358 0.339689  =1265/3724

Maximum Metrics: Maximum metrics at their respective thresholds
                        metric threshold    value idx
1                       max f1  0.080124 0.356234 248
2                       max f2  0.038274 0.515566 330
3                 max f0point5  0.173215 0.330006 131
4                 max accuracy  0.288168 0.839957  64
5                max precision  0.941437 1.000000   0
6                   max recall  0.002550 1.000000 397
7              max specificity  0.941437 1.000000   0
8             max absolute_mcc  0.113838 0.201161 195
9   max min_per_class_accuracy  0.071985 0.621087 262
10 max mean_per_class_accuracy  0.078341 0.626921 251

Gains/Lift Table: Extract with `h2o.gainsLift(<model>, <data>)` 
or `h2o.gainsLift(<model>, valid=<T/F>, xval=<T/F>)`

I use to look at the sensitivity (recall) and specificity for comparing the quality of my prediction model, but with the information provided I can not understand in terms of such indicators. Based on the information above, how can I evaluate the quality of my forecast?

If I calculate these indicators using the confusion matrix, I get: sens=0.58, spec=0.68which is different from the information provided.

If there is a way to get values ​​like we have confusionMatrixfrom caretpackage?

For me, this is more intuitive:

\ sqrt {(1-spec) ^ 2 + (1-sen) ^ 2}

logLoss.

+4
2

h2o (p) "1" ( , "0", .. 1-p).

, . . , p > 0.5 "1" , "1" , "0". , , , - : , "". (, test, ) :

5                max precision  0.941437 1.000000   0
6                   max recall  0.002550 1.000000 397

.. 0,94, , 0,00255, .

:

3                 max f0point5  0.173215 0.330006 131

( .)

:

4                 max accuracy  0.288168 0.839957  64

.. , .

, , - . , (, , , 0,288 ). , , .

P.S. , logloss. , logloss ( , , , MSE ..) .., , , .

+6

-. Confusion, (-!) (True Positives + True Negatives)/ , ( , ).

= ((TP/P) + (TN/N))/2 TP True Positive TN True Negative P N

.

+2

Source: https://habr.com/ru/post/1675996/


All Articles