All language subtitles for 005 Binary and One-Hot Encoding_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-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

Instructor: Hi, and welcome back.

Let's begin this lesson by introducing binary encoding.

We will start from the

ordinal numbers we assigned earlier.

Bread is represented by the number one,

yogurt by the number two,

and muffin is designated with three.

Binary encoding implies we should turn

these numbers into binary.

One in binary is zero one,

so bread would be zero one.

Two in binary is one zero.

So, yogurt would be one zero.

Three in binary is one one.

So, muffins would be one one.

The next step of the process is to divide

these into different columns,

as if we were creating two new variables.

For the first one, bread is zero,

yogurt is one and muffins are one.

For the second variable, bread is one,

yogurt is zero, and muffins are one.

We have differentiated between the three categories

and have removed the order.

However, there are still some

implied correlations between them.

For instance, bread and yogurt

seem exactly the opposite of each other.

It's like we are saying,

whatever is bread is not yogurt

and vice versa.

Even if this makes sense,

if we encode them in a different way.

This opposite correlation would be

true for muffins and yogurt,

but no longer for bread.

Therefore, binary encoding proves problematic,

but is a great improvement regarding

the initial ordinal method.

All right.

Finally, we have the so-called one-hot encoding.

One-hot is very simple and widely adopted.

It consists of creating as many columns

as there are possible values.

Here, we have three products.

Thus, we need three columns or three variables.

Let's call them bread, yogurt, and muffins.

Imagine these variables as asking the question:

Is this product bread?

Is this product yogurt?

And is this product muffins?

One means yes, zero means no.

So for a product that is bread,

we will have one zero zero.

For a product that is yogurt, zero one zero,

and for a product that is muffin, zero zero one.

This is very intuitive

as a product can only be of

one type at the same time.

Thus, there will be only one value one

and everything else will be zero.

This means the products are

uncorrelated and unequivocal,

which is useful and usually works like a charm.

Many lessons ago we were talking about cats,

dogs, and horses classification.

The target vectors there were one-hot encoded,

so we had the same type of vectors.

There is one big problem with

one-hot encoding, though.

One-hot encoding requires a lot of new variables.

For example, Ikea offers around 12,000 products.

Do we want to include 12,000

columns in our inputs?

Definitely not.

If we used binary, the 12,000 products

would be represented by 16 columns only

since the 12000th product would be written

like this in binary.

This is exponentially lower than the

12,000 columns we would need

for one-hot encoding.

In such cases, we must use binary,

even though that would introduce

some unjustified correlations

between the products.

Clearly there is a trade off

between binary and one-hot encoding.

We would prefer one-hot when

we have a few categories

and binary when dealing with many categories.

All right, that was all.

Thanks for watching.

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