plotLSVM | R Documentation |
Make a plot of the data and the LSVM classifier
plotLSVM(X,
Y,
A.model.lsvm,
hyperplanes = FALSE,
limit.state.estimate = TRUE,
convexity)
X |
a matrix containing the data sets |
Y |
a vector containing -1 or +1 that reprensents the class of each elements of X. |
A.model.lsvm |
a matrix containing the parameters of all hyperplanes. |
hyperplanes |
A boolean. If TRUE, plot the hyperplanes obtained. |
limit.state.estimate |
A boolean. If TRUE, plot the estimate of the limit state. |
convexity |
Either -1 if the set of data associated to the label "-1" is convex or +1 otherwise. |
plotLSVM makes a plot of the data as well as the estimate limit state and the hyperplanes involved in this construction.
This function is useful only in dimension 2.
Vincent Moutoussamy
R.T. Rockafellar:
Convex analysis
Princeton university press, 2015.
N. Bousquet, T. Klein and V. Moutoussamy :
Approximation of limit state surfaces in monotonic Monte Carlo settings
Submitted .
LSVM
modelLSVM
# A limit state function
f <- function(x){ sqrt(sum(x^2)) - sqrt(2)/2 }
# Creation of the data sets
n <- 200
X <- matrix(runif(2*n), nrow = n)
Y <- apply(X, MARGIN = 1, function(w){sign(f(w))})
## Not run:
model.A <- modelLSVM(X,Y, convexity = -1)
plotLSVM(X, Y, model.A, hyperplanes = FALSE, limit.state.estimate = TRUE, convexity = -1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.