| MeanShift | R Documentation |
This is a wrapper around the Python class sklearn.cluster.MeanShift.
rgudhi::PythonClass -> rgudhi::SKLearnClass -> rgudhi::BaseClustering -> MeanShift
new()The MeanShift class constructor.
MeanShift$new( bandwidth = NULL, seeds = NULL, bin_seeding = FALSE, min_bin_freq = 1L, cluster_all = TRUE, n_jobs = 1L, max_iter = 300L )
bandwidthA numeric value specifying the bandwidth used in the RBF
kernel. If NULL, the bandwidth is estimated using
sklearn.cluster.estimate_bandwidth().
Defaults to NULL.
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 by
sklearn.cluster.get_bin_seeds() with bandwidth as the grid size and
default values for other parameters. Defaults to NULL.
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
TRUE will speed up the algorithm because fewer seeds will be
initialized. Defaults to FALSE. Ignored if seeds is not NULL.
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_freq points as seeds. Defaults to 1L.
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 to TRUE.
n_jobsAn integer value specifying the number of jobs to use for
the computation. This works by computing each of the n_init runs in
parallel. Defaults to 1L.
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.
An object of class MeanShift.
clone()The objects of this class are cloneable with this method.
MeanShift$clone(deep = FALSE)
deepWhether to make a deep clone.
cl <- MeanShift$new()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.