guided_tour: A guided tour path.

Description Usage Arguments Details See Also Examples

View source: R/tour-guided.r

Description

Instead of choosing new projections at random like the grand tour, the guided tour always tries to find a projection that is more interesting than the current projection.

Usage

1
2
guided_tour(index_f, d = 2, alpha = 0.5, cooling = 0.99,
  max.tries = 25, search_f = search_geodesic, ...)

Arguments

index_f

the index function to optimise.

d

target dimensionality

alpha

the initial size of the search window, in radians

cooling

the amount the size of the search window should be adjusted by after each step

max.tries

the maximum number of unsuccessful attempts to find a better projection before giving up

search_f

the search strategy to use

...

arguments sent to the search_f

Details

Currently the index functions only work in 2d.

Usually, you will not call this function directly, but will pass it to a method that works with tour paths like animate, save_history or render.

See Also

cmass, holes and lda_pp for examples of index functions. The function should take a numeric matrix and return a single number, preferrably between 0 and 1. search_geodesic, search_better, search_better_random for different search strategies

Examples

1
2
3
4
5
6
7
8
9
animate_xy(flea[, 1:3], guided_tour(holes), sphere = TRUE)
animate_xy(flea[, 1:6], guided_tour(holes), sphere = TRUE)
animate_dist(flea[, 1:6], guided_tour(holes, 1), sphere = TRUE)

# save_history is particularly useful in conjunction with the
# guided tour as it allows us to look at the tour path in many different
# ways
f <- flea[, 1:3]
tries <- replicate(5, save_history(f, guided_tour(holes)), simplify = FALSE)

nspyrison/tourr documentation built on Aug. 29, 2019, 2:56 a.m.