lpdaCV {lpda}R Documentation

lpdaCV evaluates the error rate classification with a crossvalidation procedure

Description

lpdaCV evaluates the error rate classification with a crossvalidation procedure

Usage

lpdaCV(data, group, scale = FALSE, pca = FALSE, PC = 2, Variability = NULL,
                   CV = "loo", ntest = 10, R = 10, f1 = NULL, f2 = NULL)

Arguments

data

Matrix containing data. Individuals in rows and variables in columns

group

Vector with the variable group

scale

Logical indicating if data is standarised.

pca

Logical indicating if a reduction of dimension is required

PC

Number of Principal Components (PC) for PCA. By default it is 2. When the number of PC is not decided, it can be determined choosing the desired proportion of explained variability (Variability parameter) or choosing the maximum number of errors allowed in the training set (Error.max).

Variability

Parameter for Principal Components (PC) selection. This is the desired proportion of variability explained for the PC of the variables.

CV

Crossvalidation mode: loo "leave one out" or ktest: that leaves k in the test set.

ntest

Number of samples to evaluate in the test-set.

R

Number of times that the error is evaluated.

f1

Vector with weights for individuals of the first group. If NULL they are equally weighted.

f2

Vector with weights for individuals of the second group. If NULL they are equally weighted.

Value

lpdaCV The prediction error rate.

Author(s)

Maria Jose Nueda, mj.nueda@ua.es

See Also

lpda

Examples


  data(RNAseq)
  group = as.factor(rep(c("G1","G2"), each = 30))
  lpdaCV(RNAseq, group, pca = TRUE, CV = "ktest", ntest = 2)

  

[Package lpda version 1.0.1 Index]