calculate | R Documentation |
A class for metrics to assess performance of e.g. models, iterators. Not intended to be called directly, this class should be inherited to provide functionality for method-specific classes.
calculate(obj, ...)
value(obj)
value(obj) <- value
max_length(obj) <- value
metric(...)
## S4 method for signature 'metric'
calculate(obj, Y, Yhat)
## S4 method for signature 'metric'
value(obj)
## S4 replacement method for signature 'metric'
value(obj) <- value
obj |
a metric object |
... |
named slots and their values. |
value |
value |
Y |
the true class labels |
Yhat |
the predicted class labels |
value the calculated value of a metric
a metric object
MET = metric()
calculate(MET)
MET = metric()
M = metric()
calculate(M,Y,Yhat)
MET = metric()
value(MET)
MET = metric()
value(MET) = 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.