citrus.getCVMinima | R Documentation |
#' Get regularization thresholds of pre-selected cross-validation points and their indicies.
citrus.getCVMinima(modelType, thresholdCVRates, fdrRate = 0.01)
modelType |
Method to be used for model-fitting. Valid options are: |
thresholdCVRates |
Matrix of error rates at regularizationThresholds returned by |
fdrRate |
FDR Maximum used to determine FDR-constrained model regularization threshold. |
For predictive models (i.e. pamr
or glmnet
), returns indicies of regularization thresholds
producing the minimum cross validation error rate (cv.min
), the simplest model having error within 1
standard error of the minimum (cv.1se
), and the model with the minimum error having an FDR rate < fdrRate
(cv.fdr.constrained
)
when possible.
List of regularization thresholds and indicies based on pre-selected cross-validation error rates points.
Robert Bruggner
# Where the data lives
dataDirectory = file.path(system.file(package = "citrus"),"extdata","example1")
# Create list of files to be analyzed
fileList = data.frame("unstim"=list.files(dataDirectory,pattern=".fcs"))
# Read the data
citrus.combinedFCSSet = citrus.readFCSSet(dataDirectory,fileList)
# List of columns to be used for clustering
clusteringColumns = c("Red","Blue")
# Cluster data
citrus.clustering = citrus.cluster(citrus.combinedFCSSet,clusteringColumns)
# Large enough clusters
largeEnoughClusters = citrus.selectClusters(citrus.clustering)
# Build features
abundanceFeatures = citrus.calculateFeatures(citrus.combinedFCSSet,clusterAssignments=citrus.clustering$clusterMembership,clusterIds=largeEnoughClusters)
# List disease group of each sample
labels = factor(rep(c("Healthy","Diseased"),each=10))
# Calculate regularization thresholds
regularizationThresholds = citrus.generateRegularizationThresholds(abundanceFeatures,labels,modelType="pamr",family="classification")
# Calculate CV Error rates
thresholdCVRates = citrus.thresholdCVs.quick("pamr",abundanceFeatures,labels,regularizationThresholds,family="classification")
# Get pre-selected CV Minima
cvMinima = citrus.getCVMinima("pamr",thresholdCVRates)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.