Description Usage Arguments Value See Also Examples
This function allows calculating the loss of a tskrr model using
either one of the functions defined in loss_functions
or a custom user function. If the model inherits from class
tskrrTune
and no additional arguments
are given, the loss is returned for the settings used when tuning.
The function can also be used to extract the original loss from a
permtest
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | loss(x, ...)
## S4 method for signature 'tskrr'
loss(
x,
fun = loss_mse,
exclusion = c("interaction", "row", "column", "both"),
replaceby0 = FALSE,
predictions = FALSE,
...
)
## S4 method for signature 'tskrrTune'
loss(
x,
fun = loss_mse,
exclusion = c("interaction", "row", "column", "both"),
replaceby0 = FALSE,
predictions = FALSE,
...
)
## S4 method for signature 'permtest'
loss(x, ...)
|
x |
a model that inherits from class
|
... |
extra arguments passed to the loss function in |
fun |
a function to be used for calculating the loss. This can also be a character value giving the name of one of the loss functions provided in the package |
exclusion |
a character value with possible values "interaction",
"row", "column" or "both".
See also |
replaceby0 |
a logical value indicating whether the interaction
should be simply removed ( |
predictions |
a logical value to indicate whether the
predictions should be used instead of leave one out crossvalidation.
If set to |
a numeric value with the calculated loss
loss_functions
for possible loss functions
tune
for tuning a model based on loss functions
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.