Description Usage Arguments Value Examples
If you already ran the cross-validation on transformed output and now wanted to calculate performance on the back-transformed one, or vice-versa, you don't have to rerun the whole cross-validation, but just need to transform or back-transform the cross-validation Ycv. This function helps you do that.
1 | metrics_with_transform(cv, transform, lambda = NULL)
|
cv |
Cross-validation output as produced by cvLDS or cvPCR |
transform |
Either "log", "exp", "boxcox" or "inv_boxcox" |
lambda |
Lambda value used in Box-Cox or inverse Box-Cox |
A new cv object wit hthe new metrics
1 2 3 4 | # Cross-validate with log-transform
cv <- cvPCR(NPannual, NPpc, start.year = 1200, transform = 'log', metric.space = 'transformed')
# Calculate metrics based on back-transformed values
m <- metrics_with_transform(cv, 'exp')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.