functionTracking: Track the evolution of a function along merging

Description Usage Arguments Value Examples

View source: R/core.R

Description

For a given ARI merging, compute the evolution on the function f

Usage

1
functionTracking(merger, f, p = 1, n_steps = NULL, ...)

Arguments

merger

the result from having run Dune on the dataset

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

Value

a vector of length the number of merges

Examples

1
2
3
4
5
# 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)

Dune documentation built on Nov. 8, 2020, 7:55 p.m.