Linear Regression 1 [Python]

preview_player
Показать описание
This video describes how the singular value decomposition (SVD) can be used for linear regression in Python (part 1).

These lectures follow Chapter 1 from: "Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control" by Brunton and Kutz

This video was produced at the University of Washington
Рекомендации по теме
Комментарии
Автор

I'm still trying to wrap my head around the camera/display setup that allows him to write in front of himself but keeps it from looking backwards for us

It really adds to the lecture!

CausticTitan
Автор

Hey bro, can you help me out with from sklearn.linear_model import LinearRegression? I get an error message from using.
This is the error message I'm getting. from R and python.ModuleNotFoundError Traceback (most recent call last)
in <module>()
----> 1 from sklearn.Linear_model import LinearRegression
2 regressor = LinearRegression()
3 regressor.fit(X_train, y_train)

ModuleNotFoundError: No module named 'sklearn.Linear_model'
Thanks bro.

PetersonCharlesMONSTAH
Автор

Do normalizing the data and then applying SVD really make change? I mean does it helps normalizing data before applying SVD?

GauravSharma-uiyd
Автор

where is the jupyter notebook? cannot find it on website databookuw.com

threedworld
Автор

Color, LineWidth, MarkerSize
these should all be in lower case in the new version of matplotlib

soheylmoheb
Автор

For those experimenting in Mathematica, try these commands---(from PEN)

x = 3

delta = .25

a = Range[-2, 2, delta]

b = x*a + 1* RandomReal[{-1, 1}, Length[a]]

p1 = ListPlot[Transpose[{a, b}], PlotStyle -> Red,
PlotLegends -> {"Raw Data"}]

p2 = ListLinePlot[{Transpose[{a, x*a}]}, PlotStyle -> Blue,
PlotLegends -> {"Exact"}]

Show[p1, p2]

amat = Transpose[{a}]

{U, S, V} = SingularValueDecomposition[amat, MatrixRank[amat]]

xtilde = V . Inverse[S] . Transpose[U] . b // First

p3 = ListLinePlot[{Transpose[{a, xtilde*a}]}, PlotStyle -> Green,
PlotLegends -> {"Regression"}]

Show[p1, p2, p3]

PaulNielan
Автор

I understand the reason behind only using some of the data to verify your model, but would it still be 'cheating' to use all of the data to develop a more robust model to predict other homes outside of the data set?

erockromulan
Автор

Thanks for this Video. I am just starting with Machine Learning and this helped me understanding Linear Regression along with a pretty example. Also a very nice display Setup.

vivekkumbhar