Description Usage Arguments Value Note References See Also Examples
View source: R/fastJT.select.R
A method to conduct k
-fold cross-validation based the Jonckheere-Terpstra test statistics for large numbers of dependent and independent variables, with optional multi-threaded execution. The data are divided into k
subsets, one of which is withheld while the remaining k
-1 subsets are used to test the features. The process is repeated k
times, with each of the subsets withheld exactly once as the validation data. The calculation of the standardized test statistics employs the null variance equation as defined by Hollander and Wolfe (1999, eq. 6.19) to account for ties in the data.
1 | fastJT.select(Y, X, cvMesh=NULL, kFold=10L, selCrit=NULL, outTopN=15L, numThreads=1L)
|
Y |
A matrix of continuous values, representing dependent variables, e.g. marker levels or other observed values. Row names should be sample IDs, and column names should be variable names. Required. |
X |
A matrix of integer values, representing independent variables, e.g. SNP counts or other classification features. Row names should be sample IDs, and column names should be feature IDs. Required. |
cvMesh |
A user-defined function to specify how to separate the data into training and testing parts. The inputs of this function are a vector representing the sample IDs and |
kFold |
An integer to indicate the number of folds. Optional. The default value is 10. |
selCrit |
A user-defined function to specify the criteria for selecting the top features. The inputs of this function are |
outTopN |
An integer to indicate the number of top hits to be returned when |
numThreads |
A integer to indicate the number of threads to be used in the computation. Optional. The default value is |
Three lists
of length kFold
J |
A |
Pval |
A |
XIDs |
A |
Rows (samples) are assumed to be in the same order in X
and Y
.
Hollander, M. and Wolfe, D. A. (1999) Nonparametric Statistical Methods. New York: Wiley, 2nd edition.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Generate dummy data
num_sample <- 100
num_marker <- 10
num_feature <- 500
set.seed(12345)
Data <- matrix(rnorm(num_sample*num_marker), num_sample, num_marker)
Features <- matrix(rbinom(num_sample*num_feature, 2, 0.5), num_sample, num_feature)
colnames(Data) <- paste0("Var:",1:num_marker)
colnames(Features) <- paste0("Ftr:",1:num_feature)
res <- fastJT.select(Y=Data, X=Features, cvMesh=NULL, kFold=5,
selCrit=NULL, outTopN=5, numThreads=1)
res
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.