library(tourr)
animate_xy(samp,
guided_anomaly_tour(anomaly_index(),
ellipse=vc_null), ellipse=vc_null,
axes = "bottomleft", half_range=5,
center=FALSE)Projection pursuit (PP) defines a quantitative criterion for the interestingness of a projection (a projection pursuit index), and searches the space of possible projections for the most interesting one to display. Principal component analysis can be considered to the a special case of PP.
Combining PP with a tour algorithm provides a way to watch the optimisation, and see more projections than just the best. This is called a projection pursuit guided tour.
Generate a reference sample (here it is from multivariate normal), and overlay with the new sample.

Or, generate a confidence region from the reference distribution (here a ellipse because reference distribution is multivariate normal).

How do you see that an observation is outside a confidence region, or the subspaces/directions it is outside?
How do you get the optimisation to ignore one of the point sets?
Let indicate a 2D projection basis (). The reference sample is from . Mahalanobis distance measures the distance between an observation and the center using the variance-covariance matrix .
We define the new PP index as
where is the subset of points being compared with the normal.
Let be a vector. A ellipsoid corresponding to a given variance-covariance () and mean vector () is described by the equation
where is a constant that depends on a specific confidence level.
Let be a vector representing a point in , and let denote the projected mean.
The projection of the ellipsoid onto the projection space described by has the equation
The null being from a normal population is represented in the projection using an ellipse, the projection of the -D confidence ellipse.

This method is implemented in the tourr package.
Similar to data on womenβs liver function.

Can also work for longitudinal data - here being a sample from an aging male (simulated).

Example from Marcus Mayrhofer and Peter Filzmoser (2023) using robust statistics to examine weather extremes in Vienna, Austria.


Extremes in different directions. Cluster the points that are considered extreme, and run projection pursuit on each group.

Slides made in Quarto, with code on the website of the paper.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
ASC 2025 - https://dicook.github.io/ASC_2025/