predict.ramsvm: A function that provides class label predictions for objects...

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

Description

This function provides predictions on a test data set using the obtained classifier from a call of the ramsvm function.

Usage

1
2
## S4 method for signature 'ramsvm'
predict(object,newdata=NULL,lambda=NULL,...)

Arguments

object

An object returned by the "ramsvm" function.

newdata

The new predictor matrix. The number and order of predictors in newdata should be the same as those of x, which is used in the ramsvm function. If not specified, the program uses the training x matrix as the prediction object.

lambda

The lambda values on which the user wants to predict. If not specified, the program will use the lambda values returned by the ramsvm function.

...

Not used.

Value

pred.y

A prediction is made for each lambda value.

Author(s)

Chong Zhang, Yufeng Liu, and Shannon Holloway

References

C. Zhang, Y. Liu, J. Wang and H. Zhu. (2015+). Reinforced Angle-based Multicategory Support Vector Machines. Journal of Computational and Graphical Statistics, in press.

See Also

ramsvm

Examples

1
2
3
4
5
6
data(iris)
a <- ramsvm(x = as.matrix(iris[,-5]),
            y = iris[,5],
            lambda = 0.2,
            kernel="gaussian")
predict(a)

ramsvm documentation built on May 29, 2017, 1:10 p.m.

Search within the ramsvm package
Search all R packages, documentation and source code