use_distance_measure: Assign a distance measure

Description Usage Arguments Details Value See Also Examples

Description

Assigns a distance measure to the MapperRef instance to use in the clustering algorithm.

Usage

1

Arguments

measure

The distance measure to use (string).

...

Extra parameters passed to the distance function. See details.

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).

Value

The mapper instance, with the measure field assigned.

See Also

parDist pr_DB

Examples

 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)

peekxc/Mapper documentation built on June 12, 2020, 2:14 a.m.