finalize_model_tidyclust: Splice final parameters into objects

View source: R/finalize.R

finalize_model_tidyclustR Documentation

Splice final parameters into objects

Description

[Deprecated]

These functions are deprecated. Please use tune::finalize_model() and tune::finalize_workflow() instead, which now support cluster_spec objects natively.

Usage

finalize_model_tidyclust(x, parameters)

finalize_workflow_tidyclust(x, parameters)

Arguments

x

A recipe, parsnip model specification, or workflow.

parameters

A list or 1-row tibble of parameter values. Note that the column names of the tibble should be the id fields attached to tune(). For example, in the Examples section below, the model has tune("K"). In this case, the parameter tibble should be "K" and not "neighbors".

Value

An updated version of x.

Examples

kmeans_spec <- k_means(num_clusters = tune())
best_params <- data.frame(num_clusters = 5)

# Old:
finalize_model_tidyclust(kmeans_spec, best_params)

# New:
tune::finalize_model(kmeans_spec, best_params)

tidyclust documentation built on June 20, 2026, 9:08 a.m.