![](../logo.png)
Calculate Validation Error for Machine Learning Models
get_validation_error.Rd
Computes the validation error for a given machine learning model using resampled datasets. This function fits the model to each split of the data and then collects and filters the performance metrics, specifically focusing on R-squared (rsq) for validation.
Arguments
- model
A machine learning model object, expected to be compatible with the
fit_resamples
method from thetune
package.- splits
An object containing data splits, typically generated by functions from the
rsample
package, used for resampling.- metric
The performance metric of interest as a string.
Value
A data frame containing the R-squared metric for each resample along with an identification of the error type as "Validation".