projection_depth: Random projection for multivariate data

View source: R/multivariate_projection_depth.R

projection_depthR Documentation

Random projection for multivariate data

Description

Helper function to compute the random projection depth of multivariate point(s) with respect to a multivariate data.

Usage

projection_depth(dts, dt = dts, n_projections = 500L, seed = NULL)

Arguments

dts

A matrix or data frame of size m observations by d dimension or vector of length d. Contains the observation(s) whose depth is to be computed.

dt

A matrix or dataframe of size n observations by d dimension. Equals to dts by default.

n_projections

The number of directions for random projections. By default, 500 random directions for projection are generated from a scaled uniform distribution between -1 and 1.

seed

The random seed to set when generating the random directions. Defaults to NULL.

Value

A vector containing the depth values of dts with respect to dt.

Author(s)

Oluwasegun Taiwo Ojo

See Also

msplot for outlier detection using msplot and dir_out for directional outlyingness.

Examples

projection_depth(dts = iris[1:5, -5], dt = iris[1:10, -5], n_projection = 7, seed = 20)


fdaoutlier documentation built on Oct. 1, 2023, 1:06 a.m.