The scenario is pretty simple, and I'm sure it's been done a million times. The problem is I don't know the terminology to find the correct resources on the web.

Scenario: I have an environment that can be described in terms of 5 parameters, including and input value A and an output variable B. There is a dataset containing 100 rows and values for each parameter.

The output B depends on A as well as the remaining environmental variables.

The goal is to find the best value for input A such that output B is minimized.

What does the solution for this problem look like? Is it Machine learning, neural networks, a mathematical optimization problem? How is this best approached?

Extension: if I didn't have a dataset in practice, how would I train a system to suggest different values for A until a minimum is reached? Can neural networks be applied here? Or are we talking about a looping procedure that does know maths in each operation until the output doesn't change much anymore?

I thought the generalization would make it more difficult to answer. What I am describing is a number of temperature/humidity measure measurements for both inside my house and outside. The input that I can control is the fan speed setting on my evaporative aircon and the output is the lounge temperature which I want to minimize.

During sample gathering, I don't care much about the output. The set of 100 values was arbitrary and more (and diverse) samples can be obtained.

The range of A is a fan speed with discrete values 1-6. Humidity is a percentage and temperature is 20-45 degrees.

  • 2
    $\begingroup$ This is multivariate optimisation and there is no guaranteed-to-work or generally "best" approach. Too much depends on the nature of your function. For instance it makes a big difference if measurements are noisy, whether any inputs are discrete, whether this measures a real physical system, whether there are local minima, and how many. If you have a specific problem to solve here here, please explain more about it, because there is a good chance there are some techniques that might work on it. $\endgroup$ Commented Feb 1, 2019 at 9:56
  • 2
    $\begingroup$ In addition, for your follow-up question, it would be useful to know whether this is a control system where you care about the values of B generated whilst you are trying to optimise it. In other words, would it be considered bad if you tried many random values for your parameters A, just to get measurements to help the optimisation. More generally, what limits do you have on sampling new values of A? Low limits on A (e.g. can only take 100 samples maximum) combined with a complex environment (depends on your problem) could make the problem very hard, although there are still options $\endgroup$ Commented Feb 1, 2019 at 10:03
  • $\begingroup$ These comments should be an answer as they answer the question much better than the current answer @NeilSlater :) $\endgroup$
    – Eskapp
    Commented Feb 1, 2019 at 12:58
  • 1
    $\begingroup$ @Eskapp: maybe, although it would be better if OP could clarify the details of their problem - that might allow answers to pick a candidate algorithm $\endgroup$ Commented Feb 1, 2019 at 15:56
  • 1
    $\begingroup$ I updated the question with more specific information. $\endgroup$
    – danielbker
    Commented Feb 2, 2019 at 2:20

2 Answers 2


This certainly looks like a basic optimization problem. However, looking from the Machine Learning perspective, what you describe can be framed as a multilabel classification. In that case, you treat the values of A and B as your input, and try to predict the values of those five parameters, which you mentioned:

A, B -> x1, x2, x3, x4, x5

The only pitfall is that 100 records can be insufficient to train a proper classification model, but if you can obtain more training data, this approach seems solid to me.


This seems like a task for active learning where given a small set of sample data, the ML approach iteratively recommends new experiments to perform that are maximally informative until you reach a specific goal, in this case, minimization of B.

You could do this by training a model on the current data, then using a function to maximize the predicted output of the model. You would then run that experiment and add the results to the data set. You would repeat this until you observed convergent behaviour.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.