Title: | Functional Tangential Angle Pseudo-Depth |
---|---|
Description: | Computes the functional tangential angle pseudo-depth and its robustified version from the paper by Kuhnt and Rehage (2016). See Kuhnt, S.; Rehage, A. (2016): An angle-based multivariate functional pseudo-depth for shape outlier detection, JMVA 146, 325-340, <doi:10.1016/j.jmva.2015.10.016> for details. |
Authors: | Andre Rehage |
Maintainer: | Andre Rehage <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2024-12-19 06:45:21 UTC |
Source: | CRAN |
Given the discretized functional observations, the functions FUNTA
and rFUNTA
are able to compute the functional tangential angle pseudo-depths as introduced in Kuhnt and Rehage (2016).
For FUNTA and rFUNTA, insert the data in matrix form (n by T, where n is the number of observations and T is the number of time points).
A. Rehage.
Kuhnt, S.; Rehage, A. (2016) An angle-based multivariate functional pseudo-depth for shape outlier detection. Journal of Multivariate Analysis 146, 325-340.
x <- seq(0, 2*pi, by = 0.01) y1 <- sin(x) y2 <- sin(1.02*x) y3 <- cos(x) y <- rbind(y1, y2, y3) FUNTA(y, tick.dist = 0.01) rFUNTA(y, tick.dist = 0.01)
x <- seq(0, 2*pi, by = 0.01) y1 <- sin(x) y2 <- sin(1.02*x) y3 <- cos(x) y <- rbind(y1, y2, y3) FUNTA(y, tick.dist = 0.01) rFUNTA(y, tick.dist = 0.01)
Internal function that is used by FUNTA
and rFUNTA
.
angle(cut.slope, ref.slope, tick.dist)
angle(cut.slope, ref.slope, tick.dist)
cut.slope |
The slope of function x1. |
ref.slope |
The slope of function x2. |
tick.dist |
The length of the slopes. |
The intersection angle of x1 and x2.
A. Rehage
angle(1,2,0.1)
angle(1,2,0.1)
For a given dataset, FUNTA pseudo-depth values can be obtained. FUNTA is a functional data depth that is based on the intersection angles that the centered functions form with each other.
FUNTA(Data, centered = FALSE, give.angles = FALSE, tick.dist = 1)
FUNTA(Data, centered = FALSE, give.angles = FALSE, tick.dist = 1)
Data |
a matrix. Enter the discretized values of a functional data set in a n times T matrix, where n is the number of functional observations and T is the number of time points. |
centered |
boolean. If the data are already centered, that means, the mean of each row of |
give.angles |
boolean. If the intersection angles of each function with the other functions are to be displayed, set to |
tick.dist |
atomic vector. The distance between two neighbored time points can be set here. Default value is |
The larger the value of FUNTA is, the less it can be regarded as a shape outlier, and vice versa. The values are bounded by 0 and 1.
If give.angles = TRUE
, a list of two elements FUNTA and Angles. Otherwise only the first element of that list is returned.
FUNTA |
Vector of FUNTA values. First row of |
Angles |
List of intersection angles. First element of list corresponds to the intersection angles that the first row of |
A. Rehage
Kuhnt, S.; Rehage, A. (2016) An angle-based multivariate functional pseudo-depth for shape outlier detection. Journal of Multivariate Analysis 146, 325-340.
x <- seq(0, 2*pi, by = 0.01) y1 <- sin(x) y2 <- sin(1.02*x) y3 <- cos(x) y <- rbind(y1, y2, y3) FUNTA(y, tick.dist = 0.01)
x <- seq(0, 2*pi, by = 0.01) y1 <- sin(x) y2 <- sin(1.02*x) y3 <- cos(x) y <- rbind(y1, y2, y3) FUNTA(y, tick.dist = 0.01)
For a given dataset, rFUNTA pseudo-depth values can be obtained. rFUNTA is a robustified functional data depth that is based on the intersection angles that the centered functions form with each other.
rFUNTA(Data, centered = FALSE, type.inner = "max", type.outer = "median", tick.dist = 1, nObs = nrow(Data))
rFUNTA(Data, centered = FALSE, type.inner = "max", type.outer = "median", tick.dist = 1, nObs = nrow(Data))
Data |
a matrix. Enter the discretized values of a functional data set in a n times T matrix, where n is the number of functional observations and T is the number of time points. |
centered |
boolean. If the data are already centered, that means, the mean of each row of |
type.inner |
One of |
type.outer |
One of |
tick.dist |
atomic vector. The distance between two neighbored time points can be set here. Default value is |
nObs |
atomic vector. If the dataset has more than one dimension, specify |
The larger the value of FUNTA is, the less it can be regarded as a shape outlier, and vice versa. The values are bounded by 0 and 1.
Vector of rFUNTA values. First observation in Data
corresponds to first element of FUNTA
.
A. Rehage
Kuhnt, S.; Rehage, A. (2016) An angle-based multivariate functional pseudo-depth for shape outlier detection. Journal of Multivariate Analysis 146, 325-340.
x <- seq(0, 2*pi, by = 0.01) y1 <- sin(x) y2 <- sin(1.02*x) y3 <- cos(x) y <- rbind(y1, y2, y3) rFUNTA(y, tick.dist = 0.01)
x <- seq(0, 2*pi, by = 0.01) y1 <- sin(x) y2 <- sin(1.02*x) y3 <- cos(x) y <- rbind(y1, y2, y3) rFUNTA(y, tick.dist = 0.01)