Description Usage Arguments Value References Examples
cv.binomialRF
is the cross-validated form of the binomialRF
, where K-fold crossvalidation is conducted to assess the feature's significance. Using the cvFolds
=K parameter, will result in a K-fold cross-validation where the data is 'chunked' into K-equally sized groups and then the averaged result is returned.
1 2 | .cv_binomialRF(X, y, cvFolds = 5, fdr.threshold = 0.05,
fdr.method = "BY", ntrees = 2000, keep.both = FALSE)
|
X |
design matrix |
y |
class label |
cvFolds |
how many times should we perform cross-validation |
fdr.threshold |
fdr.threshold for determining which set of features are significant |
fdr.method |
how should we adjust for multiple comparisons (i.e., |
ntrees |
how many trees should be used to grow the |
keep.both |
should we keep the naive binomialRF as well as the correlated adjustment |
a data.frame with 4 columns: Feature Name, cross-validated average for Frequency Selected, CV Median (Probability of Selecting it randomly), CV Median(Adjusted P-value based on fdr.method
), and averaged number of times selected as signficant.
Zaim, SZ; Kenost, C.; Lussier, YA; Zhang, HH. binomialRF: Scalable Feature Selection and Screening for Random Forests to Identify Biomarkers and Their Interactions, bioRxiv, 2019.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | set.seed(324)
###############################
### Generate simulation data
###############################
X = matrix(rnorm(1000), ncol=10)
trueBeta= c(rep(10,5), rep(0,5))
z = 1 + X %*% trueBeta
pr = 1/(1+exp(-z))
y = as.factor(rbinom(100,1,pr))
###############################
### Run cross-validation
###############################
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.