Description Usage Arguments Details Value See Also Examples
This function computes Band Depth (BD) of elements of a univariate functional dataset with respect to another univariate functional dataset.
1 2 3 4 5 6 7 | BD_relative(Data_target, Data_reference)
## S3 method for class 'fData'
BD_relative(Data_target, Data_reference)
## Default S3 method:
BD_relative(Data_target, Data_reference)
|
Data_target |
is the univariate functional dataset, provided either as
a |
Data_reference |
is the dataset, provided either as a |
Given a univariate functional dataset of elements X_1(t), X_2(t), …, X_N(t), and another univariate functional dataset of elements Y_1(t), Y_2(t) …, Y_M(t), this function computes the BD of elements of the former with respect to elements of the latter, i.e.:
BD( X_i( t ) ) = {M \choose 2 }^{-1} ∑_{1 ≤q i_1 < i_2 ≤q M} I( G(X_i) \subset B( Y_{i_1}, Y_{i_2} ) ), \quad \forall i = 1, …, N,
where G(X_i) is the graphic of X_i(t) and B(Y_{i_1},Y_{i_2}) is the envelope of Y_{i_1}(t) and Y_{i_2}(t).
The function returns a vector containing the BD of elements in
Data_target
with respect to elements in Data_reference
.
BD
, MBD
, MBD_relative
,
fData
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | grid = seq( 0, 1, length.out = 1e2 )
Data_ref = matrix( c( 0 + sin( 2 * pi * grid ),
1 + sin( 2 * pi * grid ),
-1 + sin( 2 * pi * grid ) ),
nrow = 3, ncol = length( grid ), byrow = TRUE )
Data_test_1 = matrix( c( 0.6 + sin( 2 * pi * grid ) ),
nrow = 1, ncol = length( grid ), byrow = TRUE )
Data_test_2 = matrix( c( 0.6 + sin( 2 * pi * grid ) ),
nrow = length( grid ), ncol = 1, byrow = TRUE )
Data_test_3 = 0.6 + sin( 2 * pi * grid )
Data_test_4 = array( 0.6 + sin( 2 * pi * grid ), dim = length( grid ) )
Data_test_5 = array( 0.6 + sin( 2 * pi * grid ), dim = c( 1, length( grid ) ) )
Data_test_6 = array( 0.6 + sin( 2 * pi * grid ), dim = c( length( grid ), 1 ) )
Data_test_7 = matrix( c( 0.5 + sin( 2 * pi * grid ),
-0.5 + sin( 2 * pi * grid ),
1.1 + sin( 2 * pi * grid ) ),
nrow = 3, ncol = length( grid ), byrow = TRUE )
fD_ref = fData( grid, Data_ref )
fD_test_1 = fData( grid, Data_test_1 )
fD_test_2 = fData( grid, Data_test_2 )
fD_test_3 = fData( grid, Data_test_3 )
fD_test_4 = fData( grid, Data_test_4 )
fD_test_5 = fData( grid, Data_test_5 )
fD_test_6 = fData( grid, Data_test_6 )
fD_test_7 = fData( grid, Data_test_7 )
BD_relative( fD_test_1, fD_ref )
BD_relative( Data_test_1, Data_ref )
BD_relative( fD_test_2, fD_ref )
BD_relative( Data_test_2, Data_ref )
BD_relative( fD_test_3, fD_ref )
BD_relative( Data_test_3, Data_ref )
BD_relative( fD_test_4, fD_ref )
BD_relative( Data_test_4, Data_ref )
BD_relative( fD_test_5, fD_ref )
BD_relative( Data_test_5, Data_ref )
BD_relative( fD_test_6, fD_ref )
BD_relative( Data_test_6, Data_ref )
BD_relative( fD_test_7, fD_ref )
BD_relative( Data_test_7, Data_ref )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.