gnsc.train: gnsc.train

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/gnsc.train.R

Description

A function to conduct the Group Nearest Shrunken Centroid Classifier

Usage

1
2
gnsc.train(x, col.struc = NULL, row.struc = NULL, standardize = T,
           nlambda = NULL, lambda.max = 10, lambda = NULL, verbose = TRUE)

Arguments

x

The train data matrix (variables in the rows, samples in the columns).

col.struc

The train class labels for samples, must have the same length as the column length of x.

row.struc

The train class labels for variables, must have the same length as the row length of x.

standardize

Logical value to determine whether to standardize the data. The defult value is TRUE.

nlambda

The number of thresholding parameters. The default value is 10.

lambda.max

The largest lambda value, given the thresholding parameters lambda is not provided by the user.

lambda

A sequence of positive numbers to control to determine the thresholding level.

verbose

If verbose = FALSE, tracing information printing is disabled. The default value is TRUE.

Details

gnsc.train conducts a Group Nearest Shrunken Centroid Classifier.

Value

An object with S3 class "gnsc" is returned:

lambda

A vector of the thresholds tried in the shrinkage

nlambda

The number of thresholds tried in the shrinkage

yhat

A matrix with the estimated sample lables for each thresholding level in each column

errors

The number of estimated errors for each threshold value

nonzero

The number of variables that survived the thresholding for each thresholding value

...

System reserved (No specific usage)

Author(s)

Fang Han, Han Liu
Maintainer: Fang Han<fhan@jhsph.edu>

References

1.Juemin Yang, Fang Han, Rafa Irizarry, and Han Liu. Gene Context Analysis on Large-scale Genomic Data. Technical Report, Johns Hopkins University, 2012
2.Robert Tibshirani, Trevor Hastie, Balasubramanian Narasimhan, and Gilbert Chu. Diagnosis of multiple cancer types by shrunken centroids of gene expression PNAS, 99: 6567-6572.

See Also

gnsc.cv

Examples

1
2
3
4
5
6
7
set.seed(120)
x <- matrix(rnorm(1000*20),ncol=20)
y <- sample(c(1:4),size=20,replace=TRUE)
z <- sample(c(1:10),size=1000,replace=TRUE)
fit=gnsc.train(x, col.struc=y, row.struc=z,lambda.max=5, nlambda=20)
fit
plot(fit)

smart documentation built on May 29, 2017, 8:58 p.m.