# 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))})
#The convexity is known
if (FALSE) {
model.A <- modelLSVM(X, Y, convexity = -1)
m <- 10
X.test <- matrix(runif(2*m), nrow = m)
classOf.X.test <- LSVM(X.test, model.A, convexity = -1)
}
Run the code above in your browser using DataLab