#| child: aaa.Rmd
#| include: false

r descr_models("mean_shift", "LPCM")

Tuning Parameters

#| label: LPCM-param-info
#| echo: false
defaults <-
  tibble::tibble(
    tidyclust = c("bandwidth"),
    default = c("no default")
  )

param <-
  mean_shift() |>
  set_engine("LPCM") |>
  set_mode("partition") |>
  make_parameter_list(defaults)

This model has r nrow(param) tuning parameters:

#| label: LPCM-param-list
#| echo: false
#| results: asis
param$item

Translation from tidyclust to the original package (partition)

#| label: LPCM-cls
mean_shift(bandwidth = 0.5) |>
  set_engine("LPCM") |>
  set_mode("partition") |>
  translate_tidyclust()

Preprocessing requirements

#| child: template-makes-dummies.Rmd

LPCM::ms() scales each variable internally to the unit range before applying the Gaussian kernel, so the bandwidth value lives on the scaled scale rather than the raw data scale. Bandwidths between roughly 0.05 and 1 are typical; smaller values find more clusters and larger values merge them.

What does it mean to predict?

To predict the cluster assignment for a new observation, the mean shift procedure is run from the new point until it converges to a mode. The observation is then assigned to the cluster of the nearest discovered training mode by Euclidean distance.

References



Try the tidyclust package in your browser

Any scripts or data that you put into this service are public.

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