# 有沒有解決此問題的方法？

-EDIT 20.07

max（N的總和（t_i * s_i））聖

（M x'）_ i> = L_i然後s_i = 1

（M x'）_ i

N（s_i）上的總和= <0.06N

Blockquote

There are multiple ways to solve this problem, in my opinion it would be more of a ML problem but you can do with linear programming.

Let $$a_i$$ be the array of features for element $$i$$. Assuming you have a sample where given $$a_i$$ you are told the class it belongs to ($$S_0$$ or $$S_1$$), let $$x$$ be the matrix of weights and let $$b\in[0,1]$$ be an scalar. Establishing that $$$$a_i'x \geq b \Longleftrightarrow a_i'\in S_0$$$$ $$$$a_i'x \lt b \Longleftrightarrow a_i'\in S_1$$$$

Then, we could say the given sample should be classified correctly: $$\begin{equation*} a_i'x \ge b, \hspace{10mm} i\in S_0 \\ a_i'x \lt b, \hspace{10mm} i\in S_1 \end{equation*}$$

There is no need for an objective function, although you may need one in case the problem is infeasible (there is no linear separation). In that case your objective function could be to maximize the accuracy of your predictions, recall, f1-score, depends on the problem.

Given weights I can easily calculate how good these weights are for predicting but how can I determine weights?

From the answer above, $$x$$ would represent the weights and $$b$$ the cut point to decide whether a sample belongs to $$S_0$$ or $$S_1$$, those are the two variables in the OR problem. $$a$$ represents the observations from the sample. Solving that problem in linear programming would give you the resulting weights as well as the cut point.

This sure sounds like you guys are taking the long road to Logisitic Regression....

You have a bunch of observations, presumably with outcomes to do the training or calculate the model, right?

Each observation has 207 data elements that are numerical. (Some/many of those will likely be dropped in the final model)

And you want to make a model from that to use on new data to predict 1/0 outcomes?

This is classic logistic regression, which should be your starting point (easiest) and then maybe some ML model, but this is not optimization unless you consider the calculation of weights for logistical regression an optimization problem.