citrus.extractModelFeatures | R Documentation |
Report model features at pre-specific thresholds. For predictive models, reports non-zero model features at specified regularization thresholds. For FDR-constrained models, reports features below specified false discovery rates.
citrus.extractModelFeatures(cvMinima, finalModel, finalFeatures)
cvMinima |
List of regularization indicies at which to extract model features, produced by |
finalModel |
Predictive model from which to extract non-zero features. |
finalFeatures |
Features used to construct |
List of significant features and clusters at specified thresholds.
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)
# Build Final Model
finalModel = citrus.buildEndpointModel(abundanceFeatures,labels,family="classification",type="pamr",regularizationThresholds)
# Get model features
citrus.extractModelFeatures(cvMinima,finalModel,abundanceFeatures)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.