guided_anomaly_tour {tourr}R Documentation

A guided anomaly tour path.

Description

The guided anomaly tour is a variation of the guided tour that is using an ellipse to determine anomalies on which to select target planes.

Usage

guided_anomaly_tour(
  index_f,
  d = 2,
  alpha = 0.5,
  cooling = 0.99,
  max.tries = 25,
  max.i = Inf,
  ellipse,
  ellc = NULL,
  ellmu = NULL,
  search_f = search_geodesic,
  ...
)

Arguments

index_f

the section pursuit index function to optimise. The function needs to take two arguments, the projected data, indexes of anomalies.

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

max.i

the maximum index value, stop search if a larger value is found

ellipse

pxp variance-covariance matrix defining ellipse, default NULL. Useful for comparing data with some hypothesized null.

ellc

This can be considered the equivalent of a critical value, used to scale the ellipse larger or smaller to capture more or fewer anomalies. Default 3.

ellmu

This is the centre of the ellipse corresponding to the mean of the normal population. Default vector of 0's

search_f

the search strategy to use

...

arguments sent to the search_f

Details

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

See Also

slice_index for an example of an index functions. search_geodesic, search_better, search_better_random for different search strategies

Examples

animate_xy(flea[, 1:6], guided_anomaly_tour(anomaly_index(),
  ellipse=cov(flea[,1:6])), ellipse=cov(flea[,1:6]), axes="off")

[Package tourr version 1.2.0 Index]