MLMetric {MachineShop} | R Documentation |
MLMetric Class Constructor
Description
Create a performance metric for use with the MachineShop package.
Usage
MLMetric(object, name = "MLMetric", label = name, maximize = TRUE)
MLMetric(object) <- value
Arguments
object |
function to compute the metric, defined to accept
|
name |
character name of the object to which the metric is assigned. |
label |
optional character descriptor for the model. |
maximize |
logical indicating whether higher values of the metric correspond to better predictive performance. |
value |
list of arguments to pass to the |
Value
MLMetric
class object.
See Also
Examples
f2_score <- MLMetric(
function(observed, predicted, ...) {
f_score(observed, predicted, beta = 2, ...)
},
name = "f2_score",
label = "F Score (beta = 2)",
maximize = TRUE
)
[Package MachineShop version 3.7.0 Index]