logreg.ridge.predict: logreg.ridge.predict This function works as prediction and...

Description Usage Arguments Value Examples

View source: R/logreg.ridge.predict.R

Description

logreg.ridge.predict This function works as prediction and possible return classification error

Usage

1
logreg.ridge.predict(logreg_object, X.new, y.new = "None")

Arguments

logreg_object

this is the object obtained from running fit.logreg.ridge() function

X.new

this is the matrix data we want to compute.

y.new

this is optional y. If a y.new is specified, then the function will use it to compute error.

Value

it will return a list object with three elements: y.hat the predicted score, pred the predicted class, err if y is pecified then this is the error, otherwise its 'None'

Examples

1
2
3
4
5
x=matrix(rnorm(100),20,5)
y=sample(c(0,1),20,replace=TRUE)
logreg_object = logreg.ridge.fit(y,x,lambda=0)
X_new = x
logreg.ridge.predict( logreg_object, X_new, y )

chenyn16/LogisticRidge documentation built on Dec. 31, 2020, 9:58 p.m.