rescalePredictorWeights: Rescale the Predictor Weights

Description Usage Arguments Value Examples

Description

Solvers such as LASSO penalize predictors on a scale of 1 (full weight) to infinity (zero weight). With the rescalePredictorWeights method, incoming raw values can be scaled between a possibly theoretical minimum and maximum value.

Usage

1
2
## S4 method for signature 'Solver'
rescalePredictorWeights(obj, rawValue.min, rawValue.max, rawValues)

Arguments

obj

An object of the Solver class

rawValue.min

The minimum value of the raw expression values

rawValue.max

The maximum value of the raw expression values

rawValues

A matrix of raw expression values

Value

A matrix of the raw values re-scaled using the minimum and maximum values

Examples

1
2
3
4
5
6
7
# Create a LassoSolver object using the included Alzheimer's data and rescale the predictors
load(system.file(package="trena", "extdata/ampAD.154genes.mef2cTFs.278samples.RData"))
targetGene <- "MEF2C"
candidateRegulators <- setdiff(rownames(mtx.sub), targetGene)
ls <- LassoSolver(mtx.sub, targetGene, candidateRegulators)
raw.values <- c(241, 4739, 9854, 22215, 658334)
cooked.values <- rescalePredictorWeights(ls, rawValue.min = 1, rawValue.max = 1000000, raw.values)

trena documentation built on Nov. 15, 2020, 2:07 a.m.