R/LearnerClustAffinityPropagation.R
mlr_learners_clust.ap.Rd
A LearnerClust for Affinity Propagation clustering implemented in apcluster::apcluster()
.
apcluster::apcluster()
doesn't have set a default for similarity function.
Therefore, the s
parameter here is set to apcluster::negDistMat(r = 2L)
by default
since this is what is used in the original paper on Affity Propagation clustering.
The predict method computes the closest cluster exemplar to find the
cluster memberships for new data.
The code is taken from
StackOverflow
answer by the apcluster
package maintainer.
This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn()
:
mlr_learners$get("clust.ap") lrn("clust.ap")
mlr3::Learner
-> mlr3cluster::LearnerClust
-> LearnerClustAP
new()
Creates a new instance of this R6 class.
LearnerClustAP$new()
clone()
The objects of this class are cloneable with this method.
LearnerClustAP$clone(deep = FALSE)
deep
Whether to make a deep clone.
#> <LearnerClustAP:clust.ap> #> * Model: - #> * Parameters: s=<function> #> * Packages: apcluster #> * Predict Type: partition #> * Feature types: logical, integer, numeric #> * Properties: complete, exclusive, partitional# available parameters: learner$param_set$ids()#> [1] "s" "p" "q" "maxits" "convits" #> [6] "lam" "includeSim" "details" "nonoise" "seed"