
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.
Value
A list of extracted fitted model objects.
Returns the extracted fit parameters from the provided model object.
Examples
if (FALSE) { # \dontrun{
# Assuming 'resample_result' is predefined
fitted_models <- extract_fit(resample_result)
} # }
if (FALSE) { # \dontrun{
data(iris)
model <- linear_reg() |> set_engine("lm")
resamples <- vfold_cv(iris)
fit_results <- model |> fit_resamples(resamples)
extracted_params <- extract_fit(fit_results)
} # }