View source: R/predict.gcdnet.R
predict.gcdnet | R Documentation |
Similar to other predict methods, this functions predicts fitted values and
class labels from a fitted gcdnet
object.
## S3 method for class 'gcdnet' predict(object, newx, s = NULL, type = c("class", "link"), ...)
object |
fitted |
newx |
matrix of new values for |
s |
value(s) of the penalty parameter |
type |
type of prediction required.
|
... |
Not used. Other arguments to predict. |
s
is the new vector at which predictions are requested. If s
is not in the lambda sequence used for fitting the model, the
predict
function will use linear interpolation to make predictions.
The new values are interpolated using a fraction of predicted values from
both left and right lambda
indices.
The object returned depends on type.
Yi Yang, Yuwen Gu and Hui Zou
Maintainer: Yi Yang <yi.yang6@mcgill.ca>
Yang, Y. and Zou, H. (2012).
"An Efficient Algorithm for Computing The HHSVM and Its Generalizations."
Journal of Computational and Graphical Statistics, 22, 396-415.
BugReport: https://github.com/emeryyi/gcdnet
Gu, Y., and Zou, H. (2016).
"High-dimensional generalizations of asymmetric least squares regression and their applications."
The Annals of Statistics, 44(6), 2661–2694.
Friedman, J., Hastie, T., and Tibshirani, R. (2010).
"Regularization paths for generalized linear models via coordinate descent."
Journal of Statistical Software, 33, 1.
https://www.jstatsoft.org/v33/i01/
coef
method
data(FHT) m1 <- gcdnet(x = FHT$x,y = FHT$y) print(predict(m1, type = "class",newx = FHT$x[2:5, ]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.