predict.gcdclust: make predictions from a "gcdclust" object.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/predict.gcdclust.R

Description

Similar to other predict methods, this functions predicts fitted values and class labels from a fitted gcdclust object.

Usage

1
2
3
## S3 method for class 'gcdclust'
predict(object, newx, s = NULL,
type=c("class","link"), ...)

Arguments

object

fitted gcdclust model object.

newx

matrix of new values for x at which predictions are to be made. NOTE: newx must be a matrix, predict function does not accept a vector or other formats of codenewx.

s

value(s) of the penalty parameter lambda at which predictions are required. Default is the entire sequence used to create the model.

type

type of prediction required.

  • Type "link" gives the linear predictors for classification problems and gives predicted response for regression problems.

  • Type "class" produces the class label corresponding to the maximum probability. Only available for classification problems.

...

Not used. Other arguments to predict.

Details

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.

Value

The object returned depends on type.

Author(s)

Rachid
Maintainer: Kharoubi Rachid <rachidfahmi77@hotmail.com>

References

HHSVM-CEN 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: http://code.google.com/p/gcdclust/

Friedman, J., Hastie, T., and Tibshirani, R. (2010), "Regularization paths for generalized linear models via coordinate descent," Journal of Statistical Software, 33, 1.
http://www.jstatsoft.org/v33/i01/

See Also

coef method

Examples

1
2
3
data(FHT)
m1 = gcdclust(x=FHT$x,y=FHT$y,KK=2)
print(predict(m1,type="class",newx=FHT$x[2:5,]))

KarimOualkacha/HHSVM-ClusterNet documentation built on May 7, 2019, 12:28 p.m.