rescalePredictorWeights,Solver-method | R Documentation |
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.
## S4 method for signature 'Solver' rescalePredictorWeights(obj, rawValue.min, rawValue.max, rawValues)
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 |
A matrix of the raw values re-scaled using the minimum and maximum values
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.