mean_shift: Mean Shift Clustering

View source: R/mean_shift.R

mean_shiftR Documentation

Mean Shift Clustering

Description

mean_shift() defines a model that fits clusters by iteratively shifting observations toward regions of high density, with the number of clusters determined automatically from the data.

There are different implementations for this model, and the implementation is chosen by setting the model engine. The engine-specific pages for this model are listed below.

  • LPCM

  • meanShiftR

Usage

mean_shift(mode = "partition", engine = "LPCM", bandwidth = NULL)

Arguments

mode

A single character string for the type of model. The only possible value for this model is "partition".

engine

A single character string specifying what computational engine to use for fitting. The default engine for this model is "LPCM".

bandwidth

Positive double, kernel bandwidth controlling the size of the neighborhood used to compute the density estimate (required).

Details

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.

Value

A mean_shift cluster specification.

Examples

# Show all engines
modelenv::get_from_env("mean_shift")

mean_shift()

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