# 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))})
if (FALSE) {
model.A <- modelLSVM(X,Y, convexity = -1)
M <- 20
X.new <- matrix(runif(2*M), nrow = M)
Y.new <- apply(X.new, MARGIN = 1, function(w){ sign(f(w))})
X.new.S <- X.new[which(Y.new > 0), ]
Y.new.S <- Y.new[which(Y.new > 0)]
model.A.new <- updateLSVM(X.new.S, Y.new.S, X, Y,
model.A, convexity = -1, PLOTSVM = TRUE, step.plot.LSVM = 5)
}
Run the code above in your browser using DataLab