Hi Sascha and Nadja,
I am not too sure whether the two sample KS test is non-linear as Sascha is assuming. However I am also confused because, Sascha, you say that Gurobi can solve any convex problem, which would include x^p for p>=2. These are non-linear, which you say Gurobi can't handle. However, Gurobi is clearly able to solve quadratic functions according to
this site.
When looking at the source code for the scipy ks_samp2 function, the following is used:
data_all =np.concatenate([data1,data2])
KS = np.max(np.abs(data1.searchsorted(data_all, side='right') / n1 - data2.searchsorted(data_all, side='right') / n2
So, all it does is concatenate the 2 data sets, then sort them, take the absolute value of a difference and apply the max() function. Are any of those functions non-linear?
hth,
Oliver