All language subtitles for 06_visualization-examples.en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Let's look at some more visualizations of

w and b. Here's one example.

Over here, you have a particular point on the graph j.

For this point, w equals about negative

0.15 and b equals about 800.

This point corresponds to one pair of values for

w and b that use a particular cost j.

In fact, this booklet pair of values for w and

b corresponds to this function f of x,

which is this line you can see on the left.

This line intersects the vertical axis at 800 because

b equals 800 and the slope of the line is negative 0.15,

because w equals negative 0.15.

Now, if you look at the data points in the training set,

you may notice that this line

is not a good fit to the data.

For this function f of x,

with these values of w and b,

many of the predictions for the value of y are quite far

from the actual target value of

y that is in the training data.

Because this line is not a good fit,

if you look at the graph of j,

the cost of this line is out here,

which is pretty far from the minimum.

There's a pretty high cost because this choice of

w and b is just not that good a fit to the training set.

Now, let's look at

another example with a different choice of w and b.

Now, here's another function that

is still not a great fit for the data,

but maybe slightly less bad.

This points here represents

the cost for this booklet pair

of w and b that creates that line.

The value of w is equal to 0 and

the value b is about 360.

This pair of parameters corresponds to this function,

which is a flat line,

because f of x equals 0 times x plus 360.

I hope that makes sense.

Let's look at yet another example.

Here's one more choice for w and b,

and with these values,

you end up with this line f of x.

Again, not a great fit to the data,

is actually further away from the minimum

compared to the previous example.

Remember that the minimum is at

the center of that smallest ellipse.

Last example, if you look at f of x on the left,

this looks like a pretty good fit to the training set.

You can see on the right,

this point representing the cost is very

close to the center of the smaller ellipse,

it's not quite exactly the minimum,

but it's pretty close.

For this value of w and b,

you get to this line, f of x.

You can see that if you measure

the vertical distances between

the data points and

the predicted values on the straight line,

you'd get the error for each data point.

The sum of squared errors for all of

these data points is pretty close to

the minimum possible sum of

squared errors among all possible straight line fits.

I hope that by looking at these figures,

you can get a better sense of how different choices

of the parameters affect the line f

of x and how this

corresponds to different values for the cost j,

and hopefully you can see how

the better fit lines correspond to points on the graph of

j that are closer to the minimum possible cost

for this cost function j of w and b.

In the optional lab that follows this video,

you'll get to run

some codes and remember all the code is given,

so you just need to hit

Shift Enter to run it and take a look at it

and the lab will show you how

the cost function is implemented in code.

Given a small training set

and different choices for the parameters,

you'll be able to see how the cost varies

depending on how well the model fits the data.

In the optional lab,

you also can play with in

interactive console plot. Check this out.

You can use your mouse cursor to click

anywhere on the contour plot and you will

see the straight line defined by

the values you chose for the parameters w and b.

You'll see a dot up here also on

the 3D surface plot showing the cost.

Finally, the optional lab also has

a 3D surface plot that you can manually

rotate and spin around using

your mouse cursor to take

a better look at what the cost function looks like.

I hope you'll enjoy playing with the optional lab.

Now in linear regression,

rather than having to manually try to read

a contour plot for the best value for w and b,

which isn't really a good procedure and also won't work

once we get to more complex machine learning models.

What you really want is

an efficient algorithm that you can write in code for

automatically finding the values of parameters w

and b they give you the best fit line.

That minimizes the cost function j.

There is an algorithm for doing

this called gradient descent.

This algorithm is one of

the most important algorithms in machine learning.

Gradient descent and variations

on gradient descent are used to train,

not just linear regression,

but some of the biggest and most

complex models in all of AI.

Let's go to the next video to dive into

this really important algorithm called gradient descent.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.