Random projection depth and random functional depth for functional data.
depthf.RP1(datafA, datafB, range = NULL, d = 101, nproj = 50, nproj2 = 5)
Three vectors of depth values of length m
are returned:
Simpl_FD
the random projection depth based on the univariate simplicial depth,
Half_FD
the random projection depth based on the univariate halfspace depth,
RHalf_FD
the random halfspace depth.
Functions whose depth is computed, represented by a dataf
object of their arguments
and functional values. m
stands for the number of functions.
Random sample functions with respect to which the depth of datafA
is computed.
datafB
is represented by a dataf
object of their arguments
and functional values. n
is the sample size. The grid of observation points for the
functions datafA
and datafB
may not be the same.
The common range of the domain where the functions datafA
and datafB
are observed.
Vector of length 2 with the left and the right end of the interval. Must contain all arguments given in
datafA
and datafB
.
Grid size to which all the functional data are transformed. For depth computation,
all functional observations are first transformed into vectors of their functional values of length d
corresponding to equi-spaced points in the domain given by the interval range
. Functional values in these
points are reconstructed using linear interpolation, and extrapolation.
Number of projections taken in the computation of the random projection depth. By default taken
to be 51
.
Number of projections taken in the computation of the random functional depth. By default taken
to be 5
. nproj2
should be much smaller than d
, the dimensionality of the discretized
functional data.
Stanislav Nagy, nagy@karlin.mff.cuni.cz
The function returns the vectors of sample random projection, and random functional depth values.
The random projection depth described in Cuevas et al. (2007) is based on the average univariate depth
of one-dimensional projections of functional data. The projections are taken randomly as a sample of standard
normal d
-dimensional random variables, where d
stands for the dimensionality of the discretized
functional data.
The random functional depth (also called random Tukey depth, or random halfspace depth) is described in Cuesta-Albertos and Nieto-Reyes (2008). The functional data are projected into the real line in random directions as for the random projection depths. Afterwards, an approximation of the halfspace (Tukey) depth based on this limited number of univariate projections is assessed.
Cuevas, A., Febrero, M. and Fraiman, R. (2007). Robust estimation and classification for functional data via projection-based depth notions, Computational Statistics 22 (3), 481--496.
Cuesta-Albertos, J.A. and Nieto-Reyes, A. (2008). The random Tukey depth. Computational Statistics & Data Analysis 52 (11), 4979--4988.
depthf.RP2
datafA = dataf.population()$dataf[1:20]
datafB = dataf.population()$dataf[21:50]
depthf.RP1(datafA,datafB)
Run the code above in your browser using DataLab