Gradient boosting for optimizing multi-class hinge loss functions with componentwise linear least squares, smoothing splines and trees as base learners.
mhingebst(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 mhingebst
print(x, ...)
# S3 method for mhingebst
predict(object, newdata=NULL, newy=NULL, mstop=NULL,
type=c("response", "class", "loss", "error"), ...)
# S3 method for mhingebst
fpartial(object, mstop=NULL, newdata=NULL)
An object of class mhingebst
with print
and predict
methods being available for fitted models.
a data frame containing the variables in the model.
vector of responses. y
must be in {1, -1} for family
= "hinge".
equal costs for now and unequal costs will be implemented in the future.
family
= "hinge" for multi-class hinge loss.
an object of class bst_control
.
control parameters of rpart.
a character specifying the component-wise base learner to be used:
ls
linear models,
sm
smoothing splines,
tree
regression trees.
in predict
a character indicating whether the response, classes, loss or classification errors should be predicted in case of hinge
class of mhingebst
.
new data for prediction with the same number of columns as x
.
new response.
boosting iteration for prediction.
additional arguments.
Zhu Wang
A linear or nonlinear classifier is fitted using a boosting algorithm based on component-wise base learners for multi-class responses.
Zhu Wang (2011), HingeBoost: ROC-Based Boost for Classification and Variable Selection. The International Journal of Biostatistics, 7(1), Article 13.
Zhu Wang (2012), Multi-class HingeBoost: Method and Application to the Classification of Cancer Types Using Gene Expression Data. Methods of Information in Medicine, 51(2), 162--7.
cv.mhingebst
for cross-validated stopping iteration. Furthermore see
bst_control
if (FALSE) {
dat <- ex1data(100, p=5)
res <- mhingebst(x=dat$x, y=dat$y)
}
Run the code above in your browser using DataLab