distanceDist: Collecting all pairwise distances between input planes.

Description Usage Arguments Value Examples

View source: R/distances.R

Description

The distribution of all pairwise distances is useful to understand the optimisation in a guided tour, to compare e.g. different optimisation methods or different number of noise dimensions.

Usage

1
distanceDist(planes, nn = FALSE)

Arguments

planes

Input planes (e.g. result of guided tour)

nn

Set true to only consider nearest neighbour distances (dummy, not yet implemented)

Value

numeric vector containing all distances

Examples

1
2
3
4
5
6
planes1 <- purrr::rerun(10, tourr::basis_random(5))
planes2 <- purrr::rerun(10, tourr::basis_random(10))
d1 <- distanceDist(planes1)
d2 <- distanceDist(planes2)
d <- tibble::tibble(dist=c(d1, d2), dim=c(rep(5,length(d1)),rep(10,length(d2))))
ggplot2::ggplot(d) + ggplot2::geom_boxplot(ggplot2::aes(factor(dim), dist))

spinebil documentation built on Aug. 28, 2019, 5:04 p.m.