| AffinityPropagation | R Documentation |
This is a wrapper around the Python class sklearn.cluster.AffinityPropagation.
rgudhi::PythonClass -> rgudhi::SKLearnClass -> rgudhi::BaseClustering -> AffinityPropagation
new()The AffinityPropagation class constructor.
AffinityPropagation$new(
damping = 0.5,
max_iter = 200L,
convergence_iter = 15L,
copy = TRUE,
preference = NULL,
affinity = c("euclidean", "precomputed"),
verbose = FALSE,
random_state = NULL
)dampingA numeric value specifying the damping factor in the range
[0.5, 1.0) which is the extent to which the current value is
maintained relative to incoming values (weighted 1 - damping). This
avoids numerical oscillations when updating these values (messages).
Defaults to 0.5.
max_iterAn integer value specifying the maximum number of
iterations. Defaults to 200L.
convergence_iterAn integer value specifying the number of
iterations with no change in the number of estimated clusters that
stops the convergence. Defaults to 15L.
copyA boolean value specifying whether to make a copy of input
data. Defaults to TRUE.
preferenceA numeric value or numeric vector specifying the
preferences for each point. Points with larger values of preferences
are more likely to be chosen as exemplars. The number of exemplars,
i.e. of clusters, is influenced by the input preferences value. If the
preferences are not passed as arguments, they will be set to the median
of the input similarities. Defaults to NULL.
affinityA string specifying the affinity to use. At the moment
"precomputed" and "euclidean" are supported. "euclidean" uses the
negative squared euclidean distance between points. Defaults to
"euclidean".
verboseA boolean value specifying whether to be verbose. Defaults
to FALSE.
random_stateAn integer value specifying the seed of the random
generator. Defaults to NULL which uses current time. Set it to a
fixed integer for reproducible results across function calls.
An object of class AffinityPropagation.
clone()The objects of this class are cloneable with this method.
AffinityPropagation$clone(deep = FALSE)
deepWhether to make a deep clone.
Brendan J. Frey and Delbert Dueck (2007). Clustering by Passing Messages Between Data Points, Science.
cl <- AffinityPropagation$new()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.