cv_LogBip {BiplotML}R Documentation

Cross-Validation for logistic biplot

Description

This function run cross-validation for logistic biplot

Usage

cv_LogBip(
  data,
  k = 0:5,
  K = 7,
  method = "MM",
  type = NULL,
  plot = TRUE,
  maxit = NULL
)

Arguments

data

Binary matrix.

k

Dimensions to analyze. By default k = 1:3.

K

folds. By default K = 7.

method

Method to be used to estimate the parameters. By default method="MM"

type

For the conjugate-gradients method. Takes value 1 for the Fletcher–Reeves update, 2 for Polak–Ribiere and 3 for Beale–Sorenson.

plot

draw the graph. By default plot=TRUE

maxit

The maximum number of iterations. Defaults to 100 for the gradient methods, and 2000 for MM algorithm.

Value

Training error and generalization error for a logistic biplot model.

Author(s)

Giovany Babativa <gbabativam@gmail.com>

References

Bro R and Kjeldahl K and Smilde AK. (2008). Cross-validation of component models: a critical look at current methods. Analytical and bioanalytical chemistry. 390(5):1241-1251

Wold S. (1978). Cross-validatory estimation of the number of components in factor and principal components models. Technometrics. 20(4):397–405.

See Also

LogBip, pred_LB, fitted_LB, simBin

Examples

set.seed(1234)
x <- simBin(n = 100, p = 50, k = 3, D = 0.5, C = 20)

# cross-validation with coordinate descendent MM algorithm
cv_MM <- cv_LogBip(data = x$X, k=0:5, method = "MM", maxit = 1000)

# cross-validation with CG Fletcher-Reeves algorithm
cv_CG <- cv_LogBip(data = x$X, k=0:5, method = "CG", type = 1)


[Package BiplotML version 1.0.1 Index]