Subset Simulation Monte Carlo
Provides the
1  testConvexity(X,Y)

X 
a matrix containing the data sets 
Y 
a vector containing 1 or +1 that reprensents the class of each elements of X. 
testConvexity test if one of the two data set is potentially convex.
An object of class list
containing the number of the class which is convex and the parameters of a set of hyperplanes separating the two classes
Vincent Moutoussamy
R.T. Rockafellar:
Convex analysis
Princeton university press, 2015.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  # 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:
TEST.Convexity < testConvexity(X, Y)
if(length(TEST.Convexity) == 2){
Convexity < TEST.Convexity[[1]]
model.A < TEST.Convexity[[2]]
}
if(length(TEST.Convexity) == 1){
# The problem is not convex
Convexity < 0 #the problem is not convex
}
## 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.