dot-tukey_depth_cpp: Tukey (Halfspace) Depth

.tukey_depth_cppR Documentation

Tukey (Halfspace) Depth

Description

Computes the Tukey halfspace depth of one or more query points with respect to a reference distribution estimated from data, using an adaptive random projection approximation.

Usage

.tukey_depth_cpp(
  x,
  data,
  tol = 0.01,
  batch_size = 100L,
  min_batches = 5L,
  patience = 3L,
  seed = 42L
)

Arguments

x

Numeric matrix of query points (m x d), or a numeric vector of length d for a single query point.

data

Numeric matrix of reference data (n x d).

tol

Convergence tolerance. Default 0.01.

batch_size

Number of random projections per batch. Default 100.

min_batches

Minimum batches before checking convergence. Default 5.

patience

Consecutive stable batches to declare convergence. Default 3.

seed

Integer random seed for reproducibility. Default 42.

Value

Numeric vector of depth values in [0, 0.5], one per query point.


depthR documentation built on June 26, 2026, 5:07 p.m.