Description Usage Arguments Value Examples
View source: R/logreg.ridge.predict.R
logreg.ridge.predict This function works as prediction and possible return classification error
1 | logreg.ridge.predict(logreg_object, X.new, y.new = "None")
|
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. |
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'
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 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.