wsvm.boost: Weighted SVM using boosting algorithm

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

View source: R/wsvm.boost.r

Description

Improve accuracy for learning algorithm to bond with a lot of weak classifiers to construct the only one strong classifier.

Usage

1
    wsvm.boost(X, Y, new.X, new.Y, c.n, B = 50, kernel.type = list(type = "rbf", par= 0.5), C = 4, eps = 1e-10, plotting = FALSE)

Arguments

X

input variable matrix to generate kernel. Data type must be a matrix format.

Y

output variable vector which will be declared as a matrix in SVM. Data type must be a matrix format.

new.X

test predictors.

new.Y

test response.

c.n

weighted term.

B

the number of iterations.

kernel.type

set an attributes of kernel using list(). kernel$type means a type of kernel, including 'linear', 'poly', and 'rbf'. kernel$par means a parameter of kernel. For example, par = degree for 'poly' and par = scale for 'rbf'.

C

regularization parameter.

eps

epsilon value.

plotting

logical values. If TRUE, plot the result.

Value

A function wsvm.boost generates a list consists of error.rate and predicted.model.

error.rate

misclassification error rate

predicted.model

predicted model

Author(s)

SungWhan Kim swiss747@korea.ac.kr
Soo-Heang Eo hanansh@korea.ac.kr

References

SungWhan Kim (2010). Weighted K-means SVM with Boosting algorithm for improving accuracy, Master Thesis, Korea University.

See Also

wsvm, wsvm.predict

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# generate a simulation data set using mixture example(page 17, Friedman et al. 2000)

svm.data <- simul.wsvm(set.seeds = 123)
X <- svm.data$X
Y <- svm.data$Y
new.X <- svm.data$new.X
new.Y <- svm.data$new.Y

# run Weighted K-means clustering SVM with boosting algorithm
model <- wsvm(X, Y, c.n = rep(1/ length(Y),length(Y)))

# predict the model and compute an error rate. 
pred <- wsvm.predict(X,Y, new.X, new.Y, model)

Error.rate(pred$predicted.Y, Y)

# add boost algorithm

boo <- wsvm.boost(X, Y, new.X, new.Y, c.n = rep(1 / length(Y),length(Y)), 
    B = 50, kernel.type = list(type = "rbf", par= 0.5), C = 4, 
    eps = 1e-10, plotting = TRUE)
boo

wSVM documentation built on May 2, 2019, 12:24 p.m.