Learn R Programming

BigTSP (version 1.0)

LDCA: Linear Discriminant Analysis based on Top Scoring Pair

Description

Linear Discriminant Analysis based on Top Scoring Pair

Usage

LDCA(X,y,nlambda=100,lambda=NULL,threshold=1e-07)

Arguments

X
input matrix, of dimension nobs x nvars; each row is an observation vector.
y
response variable.
nlambda
The number of lambda values - default is 100.
lambda
user specified lambda sequence
threshold
Convergence threshold for coordinate descent. A parameter from "glmnet" package. Defaults value is 1E-7.

Value

  • An object with S3 class "LDCA","glmnet"
  • callthe call that produced this object
  • a0Intercept sequence of length length(lambda)
  • betaFor "elnet" and "lognet" models, a nvars x length(lambda) matrix of coefficients, stored in sparse column format ("CsparseMatrix"). For "multnet", a list of nc such matrices, one for each class.
  • lambdaThe actual sequence of lambda values used
  • dev.ratioThe fraction of (null) deviance explained (for "elnet", this is the R-square). The deviance calculations incorporate weights if present in the model. The deviance is defined to be 2*(loglike_sat - loglike), where loglike_sat is the log-likelihood for the saturated model (a model with a free parameter per observation). Hence dev.ratio=1-dev/nulldev.
  • nulldevNull deviance (per observation). This is defined to be 2*(loglike_sat -loglike(Null)); The NULL model refers to the intercept model, except for the Cox, where it is the 0 model.
  • dfThe number of nonzero coefficients for each value of lambda. For "multnet", this is the number of variables with a nonzero coefficient for any class.
  • dimdimension of coefficient matrix (ices)
  • nobsnumber of observations
  • npassestotal passes over the data summed over all lambda values
  • offseta logical variable indicating whether an offset was included in the model
  • jerrerror flag, for warnings and errors (largely for internal debugging).

References

Geman, D., dAvignon, C.: Classifying gene expression profiles from pairwise mRNA comparisons. Statistical Applications in Genetics and Molecular Biology, 3(1):19 (2007)

See Also

summary.LDCA,print.LDCA,predict.LDCA,plot.LDCA

Examples

Run this code
library(glmnet)
x=matrix(rnorm(100*20),100,20)
y=rbinom(100,1,0.5)
fit=LDCA(x,y)
print(fit)
predict(fit,newx=x[1:10,]) # make predictions

Run the code above in your browser using DataLab