Machine Learning, Data Science, Optimization, Editors Pick, Thoughts And Theory.
to find the direction of the optimum we need to fit a model. The simplest way is to define a pipeline with PolynomialFeatures and LinearRegression. We use PolynomialFeatures to calculate the interactions parameter between x and y (x*y) and eventually (with interaction=False) also terms like (x**2