Answer the question
In order to leave comments, you need to log in
How to build a polynomial regression model with multiple independent variables using Python?
How to build a polynomial regression model of the second degree with several independent variables (from 2x to 4x) in such a way that you can see the equation itself and the data to assess the adequacy of the model? The data array includes 50 dependent variables and 4 independent variables for each of them.
Answer the question
In order to leave comments, you need to log in
There are many options.
sklearn.preprocessing.PolynomialFeatures is the time.
You can manually convert a multivariate polynomial model to a multivariate linear one, and then run
sklearn.LinearRegression()
You can use the more general variant
scipy.optimize.curve_fit() , and since regression is essentially a minimization problem, any function can be fitted here. Moreover, scipy.optimize has many different numerical optimization methods that can be used to obtain a regression model, including.
In TensorFlow, you can use the
GradientDescentOptimizer
. But I recommend that you first understand the task and terminology. Your phrase
"50 dependent variables" - at first plunged me into a stupor.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question