Make a plot of the data and the LSVM classifier
1 2 3 4 5 6 
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 .
1 2 3 4 5 6 7 8 9 10 11 12 13 14  # 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)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.