Ridge regression plot

Share:

Description

A plot of the regularised regression coefficients is shown.

Usage

1
alfaridge.plot(y, x, a, lambda = seq(0, 5, by = 0.1) )

Arguments

y

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 the logit transformation. In any case, they must be continuous only.

x

A numeric matrix containing the continuous variables. Rows are samples and columns are features.

a

The value of the α-transformation. It has to be between -1 and 1. If there are zero values in the data, you must use a strictly positive value.

lambda

A grid of values of the regularisation parameter λ.

Details

For every value of λ the coefficients are obtained. They are plotted versus the λ values.

Value

A plot with the values of the coefficients as a function of λ.

Author(s)

Michail Tsagris

R implementation and documentation: Giorgos Athineou <athineou@csd.uoc.gr> and Michail Tsagris <mtsagris@yahoo.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.

Tsagris M.T., Preston S. and Wood A.T.A. (2011). A data-based power transformation for compositional data. In Proceedings of the 4th Compositional Data Analysis Workshop, Girona, Spain. http://arxiv.org/pdf/1106.1451.pdf

See Also

ridge.plot, alfa.ridge

Examples

1
2
3
4
library(MASS)
y <- fgl[, 1]
x <- fgl[, 2:9]
alfaridge.plot(y, x, a = 0.5, lambda = seq(0, 5, by = 0.1) )

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.