ridgereg-class: Do you want to make a Ridge Regression?

Description Fields Methods Examples

Description

This function make a "Reference Class" with class=ridgereg for a Ridge Regression

Fields

formula

The formula for the model

data

A object of class data.frame

lambda

The lambda value

Methods

coef()

Give you the coef values as a numeric vector

predict(values = NULL)

Give you the fited values if the input is NULL and the predicted values if you have some new input

print()

Give you a nice view of the calculation

Examples

1
2
3
4
data(iris)
ridgereg$new(Petal.Length~Sepal.Width+Sepal.Length, data=iris,0.5)$print()
ridgereg$new(Petal.Length~Sepal.Width+Sepal.Length, data=iris,0.5)$predict()
ridgereg$new(Petal.Length~Sepal.Width+Sepal.Length, data=iris,0.5)$coef()

vasterlund/Lab7_Albin_Eric documentation built on May 7, 2019, 3:57 a.m.