L2OptW: L2OptW

Description Usage Arguments Value References Examples

Description

Calculates a weight vector to be used for the weighted Kozachenko–Leonenko estimator. The weight vector has minimum L_2 norm subject to the linear and sum-to-one constraints of (2) in Berrett, Samworth and Yuan (2018).

Usage

1
L2OptW(k, d)

Arguments

k

The tuning parameter that gives the number of neighbours that will be considered by the weighted Kozachenko–Leonenko estimator.

d

The dimension of the data.

Value

The weight vector that is the solution of the optimisation problem.

References

\insertRef

BSY2017IndepTest

Examples

1
2
3
4
5
6
7
8
9
# When d < 4 there are no linear constraints and the returned vector is (0,0,...,0,1).
L2OptW(100,3)    
w=L2OptW(100,4)
plot(w,type="l")
w=L2OptW(100,8);
# For each multiple of 4 that d increases an extra constraint is added.
plot(w,type="l")  
w=L2OptW(100,12)
plot(w, type="l") # This can be seen in the shape of the plot

IndepTest documentation built on May 1, 2019, 10:24 p.m.

Related to L2OptW in IndepTest...