![](../logo.png)
Extract Fitted Model Object from Resampling
extract_fit.Rd
Extracts the fitted model object from each resample.
This function simplifies the process of extracting fit parameters from a model object
created using the parsnip
package. It is particularly useful in scenarios where
model objects are embedded within resampled results.
Arguments
- x
A model object, typically resulting from a resampling process (e.g., using
fit_resamples
from thersample
package).
Value
A list of extracted fitted model objects.
Returns the extracted fit parameters from the provided model object.
Examples
if (FALSE) {
# Assuming 'resample_result' is predefined
fitted_models <- extract_fit(resample_result)
}
if (FALSE) {
data(iris)
model <- linear_reg() |> set_engine("lm")
resamples <- vfold_cv(iris)
fit_results <- model |> fit_resamples(resamples)
extracted_params <- extract_fit(fit_results)
}