This is a wrapper around the Python class sklearn.cluster.MeanShift.
Super classes
rgudhi::PythonClass -> rgudhi::SKLearnClass -> rgudhi::BaseClustering -> MeanShift
Methods
Method new()
The MeanShift class constructor.
Usage
MeanShift$new(
bandwidth = NULL,
seeds = NULL,
bin_seeding = FALSE,
min_bin_freq = 1L,
cluster_all = TRUE,
n_jobs = 1L,
max_iter = 300L
)Arguments
bandwidthA numeric value specifying the bandwidth used in the RBF kernel. If
NULL, the bandwidth is estimated using sklearn.cluster.estimate_bandwidth(). Defaults toNULL.seedsA numeric matrix of shape \(n_\mathrm{samples} \times n_\mathrm{features}\) specifying the seeds used to initialize kernels. If
NULL, the seeds are calculated bysklearn.cluster.get_bin_seeds()with bandwidth as the grid size and default values for other parameters. Defaults toNULL.bin_seedingA boolean value specifying whether initial kernel locations are not locations of all points, but rather the location of the discretized version of points, where points are binned onto a grid whose coarseness corresponds to the bandwidth. Setting this option to
TRUEwill speed up the algorithm because fewer seeds will be initialized. Defaults toFALSE. Ignored ifseedsis notNULL.min_bin_freqAn integer value specifying the minimal size of bins. To speed up the algorithm, accept only those bins with at least
min_bin_freqpoints as seeds. Defaults to1L.cluster_allA boolean value specifying whether all points are clustered, even those orphans that are not within any kernel. Orphans are assigned to the nearest kernel. If
FALSE, then orphans are given cluster label-1. Defaults toTRUE.n_jobsAn integer value specifying the number of jobs to use for the computation. This works by computing each of the
n_initruns in parallel. Defaults to1L.max_iterAn integer value specifying the maximum number of iterations per seed point before the clustering operation terminates (for that seed point) if it has not yet converged. Defaults to
300L.