Function conducts leave-one-out optimization to find \(\lambda\) using a golden search search with caching. This function is called internally by krls
. It would normally not be called by the user directly.
lambdasearch(L=NULL,
U=NULL,
y=NULL,
Eigenobject=NULL,
tol=NULL,
noisy=FALSE,
eigtrunc=NULL)
Non-negative scalar that determines the lower bound of the search window. Default is NULL
which means that the lower bound is found using an algorithm (see details).
Positive scalar that determines the upper bound of the search window. Default is NULL
which means that the upper bound is found using an algorithm (see details).
N by 1 matrix of outcomes.
List that contains the eigenvalues and eigenvectors of the kernel matrix K.
Positive scalar that determines the tolerance used in the optimization routine used to find \(\lambda\). Default is NULL
which means that convergence is achieved when the difference in the sum of squared leave-one-out errors between the i
and the i+1
iteration is less than N * 10^-3
.
If TRUE
, the function will print details of the golden section search.
Positive scalar value that determines truncation of eigenvalues for lamnda search window. See krls
for details. Default is NULL
which means no truncation.
A scalar that contains the \(\lambda\) that minimizes the sum of squared leave-one-out errors.
By default, upper bound is found as follows: Set j to n, decrease by one until the following is longer true: sum(EigenValues / (EigenValues + j)) < 1.
By default, upper bound is found as follows: Get the position, q, of the eigenvalue that is closest to max(Eigenvalue)/1000. Set j to 0, increase in steps of 0.05 until the below is longer true: sum(EigenValues / (EigenValues + j)) > q.