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

 $use_distance_measure(measure, ...)  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: ["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.

parDist pr_DB
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()
# }