citrus.generateRegularizationThresholds: Generate model regularization thresholds

View source: R/citrus.model.R

citrus.generateRegularizationThresholdsR Documentation

Generate model regularization thresholds

Description

Generate a range of regularization thresholds for model construction

Usage

citrus.generateRegularizationThresholds.classification(features, labels,
  modelType, n = 100, ...)

citrus.generateRegularizationThresholds.continuous(features, labels, modelType,
  n = 100, ...)

citrus.generateRegularizationThresholds(features, labels, modelType, family,
  n = 100, ...)

Arguments

features

Features used to construct model

labels

Endpoint lables for samples and features

modelType

Method used to construct endpoint model. Valid options are: pamr and glmnet.

n

Number of regularization thresholds to generate

...

Other arguments passed to model-fitting methods

family

Model family. Valid options are: classification and continuous.

Value

A vector of regularization threshold values.

Author(s)

Robert Bruggner

Examples

# 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")

nolanlab/citrus documentation built on April 19, 2024, 6:49 p.m.