e271p314
e271p314

Reputation: 4029

Find optimal paramters for target value in pandas dataframe

I have some code that takes parameters x1, x2... xn and outputs the value y. I want to find the parameters that maximize y. I picked randomly the parameters 1000 times, calculated the target value and wrote the data to pandas dataframe. So my dataframe has 1000 rows and n+1 columns, n for parameters and 1 for target value. What next? In calculus I would derive the function that I want to maximize and look for the derivative zeros. The problem is that I don't have the analytical expression of the function, just the code which calculates it. Clearly it is not simply to return the row of parameters with maximal y because it is possible that a different combination of parameters will produce higher values for y.

Upvotes: 1

Views: 162

Answers (0)

Related Questions