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.

## Dictionary

This Learner can be instantiated via the dictionary mlr_learners or with the associated sugar function lrn():

### Method clone()

The objects of this class are cloneable with this method.

LearnerClustAP$clone(deep = FALSE) #### Arguments deep Whether to make a deep clone. ## Examples learner = mlr3::lrn("clust.ap") print(learner) #> <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"