functionTracking.Rd
For a given ARI merging, compute the evolution on the function f
functionTracking(merger, f, p = 1, n_steps = NULL, ...)
merger | the result from having run |
---|---|
f | the function used. It must takes as input a clustering matrix and return a value |
p | A value between 0 and 1. We stop when the mean ARI has improved by p of the final total improvement. Default to 1 (i.e running the full merging). |
n_steps | Alternatively, you can specifiy the number of merging steps to do before stopping. |
... | additional arguments passed to f |
a vector of length the number of merges
# Return the number of clusters for the fourth cluster label data("clusMat", package = "Dune") merger <- Dune(clusMat = clusMat) f <- function(clusMat, i) dplyr::n_distinct(clusMat[, i]) functionTracking(merger, f, i = 4)#> [1] 12 12 12 11 11 11 10 10