In the following dataset, the first 4 columns are predictor variables and the engine running index is the response variable.

   O2 level | Cylinder pressure | Fuel Flow | Engine temp | Engine running index
       5              15               3           31                7
       2              31              18            1               88
       1              22              66            4               31
      ...            ...              ...          ...             ...

Situation: An engineer comes with a similar data set and asks a question: "What should be the setting of my O2 level, cylinder pressure etc to get the best running index?"

Now one could take a statistical approach and try figure out the answer, but I was looking to employ some machine learning techniques. The ones I've tried, i.e. Regression, are used more to predict what the Engine running index will be, rather than suggest what the settings should be, to get the best running index. The other one I was looking at was PCA, but not sure that it will give me an answer as well.

Note: the possible max value for Engine running index is not known.


Are there ML techniques to help me answer the engineer's question?

  • 1
    $\begingroup$ Model the joint density and find the peaks. $\endgroup$
    – Emre
    Aug 25 '17 at 17:42
  • $\begingroup$ There are ML approaches to this, you should tell what is the best Engine running index is, is it a range of numbers? (min/max number?) $\endgroup$
    – i.n.n.m
    Aug 25 '17 at 20:54
  • $\begingroup$ You can see from data, it's a single number. Thanks $\endgroup$ Aug 25 '17 at 21:54


When you do Regression on this dataset, what you obtain is:

$\hspace{60mm}f(x_1,x_2,x_3,x_4) = ERI$

where your $x_1,x_2,x_3,x_4, ERI$ are O2 level, Cylinder Pressure, Fuel Flow,, Engine Temp, and Engine Running Indexrespecetively. In case of Multiple Regression, you will get 1 coefficient per feature (total 4 in coef_, {$w_1,w_2,w_3,w_4$}) and one intercept_ ($w_0$) term for the intercept. Your equation would then come to look like:

$\hspace{40mm}ERI = w_1 x_1 + w_2 x_2 +w_3 x_3 +w_4 x_4 +w_0$,

where $w_0$ - $w_4$ are fixed values. Your objective then is to find the best $x_1$ - $x_4$ which maximize $ERI$.


The above is better expressed by the optimization problem:

$\max_{(x_1,x_2,x_3,x_4)} w_1 x_1 + w_2 x_2 +w_3 x_3 +w_4 x_4 +w_0$ with constraints that $x_1,x_2,x_3,x_4 \geq 0$

I added those constraints by default as all those variables would be positive only. You could have upper limits on each of them as well. It is important to add these constraints because you don't want any of your value to reach $\infty$ or even some unrealistic values like Engine Temp = $10^6$.

The above function is the objective function which you want to maximize, OR you can minimize the negative of the same. Both of them are equivalent. Thus your objective becomes:

$\min_{(x_1,x_2,x_3,x_4)} -(w_1 x_1 + w_2 x_2 +w_3 x_3 +w_4 x_4 +w_0)$ with constraints that $x_1,x_2,x_3,x_4 \geq 0$

From here, you can use Scipy's Minimization function with the Objective function we just came up with.


You should try to define what is 'best' Engine running index. Then try to cluster your data given that measure (Engine running index) so that you will put in one cluster all the 'best' Engine running index.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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