Multiple Linear Regression

preview_player
Показать описание


Multiple Linear Regression predicts one output from multiple inputs. This tutorial review three methods in Python to perform a simple regression problem with 2 dependent variables and 1 independent variables. The output from the statsmodels summary is reviewed to highlight the statistical information.
Рекомендации по теме
Комментарии
Автор

great videos sir, very informative. Please implement techniques like independent component analysis, kurtosis, RNN etc.

shahkhan
Автор

Good day APMonitor, I am new to python, less than a month and your videos have been a great help. Thank you!. I am trying to run a multiple linear regression with 4 independent variables. However, i am trying to put some constraints where all independent variables sum up to 1 with each of the beta values greater than or equals to zero. I have watched this video as well as the constrained linear regression video, but not able to crack it . (please see below)

m = GEKKO(remote=False); m.options.IMODE=2
c = m.Array(m.FV, 5); c[0].STATUS=1; c[1].STATUS=1; c[2].STATUS=1; c[3].STATUS=1; c[4].STATUS=1 #create new constants, first is the slope, second is the intercept
c[1].lower>=0 #putting constraint on the intercept
c[2].lower>=0
c[3].lower>=0
c[4].lower>=0
xd = m.Param(X0_array, X1_array, X2_array, X3_array); yd = m.Param(Y_array); yp = m.Var() #your X and Y data as well as your predicted Y

m.Minimize((yd-yp)**2)
m.solve(disp=False)
c = [c[0].value[0], c[1].value[1], [c[2].value[2], c[3].value[3], c[4].value[4], c[5].value[5]

any pointers you have is greatly appreciated.

bigwolls