Ridge regression coefficients plot {MXM} | R Documentation |
Ridge regression
Description
A plot of the regularised parameters is shown.
Usage
ridge.plot(target, dataset, lambda = seq(0, 5, by = 0.1) )
Arguments
target |
A numeric vector containing the values of the target variable. If the values are proportions or percentages, i.e. strictly within 0 and 1 they are mapped into R using log( target/(1 - target) ). In any case, they must be continuous only. |
dataset |
A numeric matrix containing the continuous variables. Rows are samples and columns are features. |
lambda |
A grid of values of the regularisation parameter |
Details
For every value of \lambda
the coefficients are obtained. They are plotted versus the \lambda
values.
Value
A plot with the values of the coefficients as a function of \lambda
.
Author(s)
Michail Tsagris
R implementation and documentation: Giorgos Athineou <athineou@csd.uoc.gr>, Vincenzo Lagani <vlagani@csd.uoc.gr> and Michail Tsagris mtsagris@uoc.gr
References
Hoerl A.E. and R.W. Kennard (1970). Ridge regression: Biased estimation for nonorthogonal problems. Technometrics, 12(1): 55-67.
Brown P. J. (1994). Measurement, Regression and Calibration. Oxford Science Publications.
See Also
Examples
#simulate a dataset with continuous data
dataset <- matrix( runif(300 * 20, 1, 20), nrow = 300 )
#the target feature is the last column of the dataset as a vector
target <- dataset[, 20]
dataset <- dataset[, -20]
ridge.plot(target, dataset)