Reputation: 41
I have a large number of data points. For example, in the table below, x1, x2, x3 are inputs. Y is the output. Inputs can take any fraction value. I want to estimate the input vector which minimizes the value of Y. For example, y is estimated to take a minimum of 13.9 @ (x1, x2, x3) = (0.1 , 0.95, 0.2).
Any help or nudge in the right direction is appreciated.
x1 x2 x3 y
0 0 0 15
0 0 1 15
0 1 0 14
0 1 1 18
1 0 0 20
1 0 1 19
1 1 0 21
1 1 1 15
Upvotes: 3
Views: 141
Reputation: 13079
If the function is defined by specific points, you can just pick the coordinate with the minimum value. The function cannot take any lower value without further assumptions about the function. Example in numpy below
import numpy as np
data = """0 0 0 15
0 0 1 15
0 1 0 14
0 1 1 18
1 0 0 20
1 0 1 19
1 1 0 21
1 1 1 15"""
A = np.array([line.split() for line in data.splitlines()]).astype(float)
A[np.argmin(A[:, 3]), :]
Will print array([ 0., 1., 0., 14.])
which is the point where the function takes it's minimum value.
Upvotes: 1