# Can someone recommend an algorithm to optimize this data

#### PeterDonis

Mentor
I want to predict $z_i$ on samples of which I don't know $z_i$.
You can't, unless there is some pattern in the samples. But whether there is a pattern in the samples is a completely separate question from how to maximize the sum of the $z_i$.

I know $z_i$ is a function of $\vec{x_i}$, but I don't know the function.
Then, again, the only way to find it out is to look for some pattern in the samples; in short, trial and error. But, again, that's a completely separate question from how to maximize the sum of the $z_i$.

I am trying to find constraints on $x_i$. I want to find these constraints to create a subset of my dataset with a maximum $\sum z_i$.
Finding the subset of the dataset you already have that maximizes $\sum z_i$ is easy: as I said before, just throw out all the samples with negative $z_i$.

Finding a set of constraints on the $\vec{x}_i$ that pick out that particular subset of the samples is a matter of trial and error; there is no algorithm for doing it. Plus, even if you found such a function on the known samples, you would have no way of knowing whether the same function also works for the samples you're going to get in the future.

Also, finding constraints on the $\vec{x}_i$ that pick out the subset of known samples that maximizes $\sum z_i$ is a separate question from finding the function $\vec{x}_i \rightarrow z_i$ that lets you compute $z_i$ for each sample. Finding the latter is also a process of trial and error, as noted above, but it's a different process.

"Can someone recommend an algorithm to optimize this data"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving