Description Usage Arguments Details Value See Also Examples
Assigns a distance measure to the MapperRef
instance to use in the clustering algorithm.
1 | $use_distance_measure(measure, ...)
|
measure
The distance measure to use (string).
...
Extra parameters passed to the distance function. See details.
Unless the clustering_algorithm
has been replaced by the user,
by default, Mapper requires a notion of distance between objects to be defined in creating the vertices of the construction.
The distance function is determined based on the supplied measure
. measure
must be one of:
1 | ["euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski"]
|
or, if the proxy and parallelDist
packages are installed, any name in proxy::pr_DB$get_entry_names()
.
Additional parameters passed via ...
are passed to either dist
(or
parallelDist
if installed).
The mapper instance, with the measure field assigned.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(noisy_circle)
m <- MapperRef$new(noisy_circle)
m$use_filter(noisy_circle[,1])
m$use_cover("fixed interval", number_intervals = 5, percent_overlap = 25)
## Constructs clusters with euclidean metric (default)
m$use_distance_measure("euclidean")
m$construct_pullback()
## Constructs clusters with p-norm (p = 1)
m$use_distance_measure("Minkowski", p = 1L)
m$construct_pullback()
## Not run:
## To see list of available measures, use:
proxy::pr_DB$get_entry_names()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.