Learn R Programming

bst (version 0.3-2)

msvm: Boosting for Multi-class Classification

Description

Gradient boosting for optimizing multi-class hinge loss functions with componentwise linear least squares, smoothing splines and trees as base learners.

Usage

msvm(x, y, cost = NULL, family = c("hinge"), ctrl = bst_control(), 
control.tree = list(fixed.depth=TRUE, n.term.node=6, maxdepth = 1), learner = c("ls", "sm", "tree"))
## S3 method for class 'msvm':
print(x, ...)
## S3 method for class 'msvm':
predict(object, newdata=NULL, newy=NULL, mstop=NULL, type=c("response", "class", "loss", "error"), ...)
## S3 method for class 'msvm':
fpartial(object, mstop=NULL, newdata=NULL)

Arguments

x
a data frame containing the variables in the model.
y
vector of responses. y must be in {1, -1} for family = "hinge".
cost
equal costs for now and unequal costs will be implemented in the future.
family
family = "hinge" for multi-class hinge loss.
ctrl
an object of class bst_control.
control.tree
control parameters of rpart.
learner
a character specifying the component-wise base learner to be used: ls linear models, sm smoothing splines, tree regression trees.
type
in predict a character indicating whether the response, classes, loss or classification errors should be predicted in case of hinge
object
class of msvm.
newdata
new data for prediction with the same number of columns as x.
newy
new response.
mstop
boosting iteration for prediction.
...
additional arguments.

Value

  • An object of class msvm with print and predict methods being available for fitted models.

Details

A linear or nonlinear classifier is fitted using a boosting algorithm based on component-wise base learners for multi-class responses.

References

Zhu Wang (2011), HingeBoost: ROC-Based Boost for Classification and Variable Selection. The International Journal of Biostatistics, 7(1), Article 13.

Zhu Wang (2011), Multi-class HingeBoost: Method and Application to the Classification of Cancer Types Using Gene Expression Data. Manuscript.

See Also

cv.msvm for cross-validated stopping iteration. Furthermore see bst_control

Examples

Run this code
dat <- ex1data(200)
res <- msvm(x=dat$x, y=dat$y)

Run the code above in your browser using DataLab