All language subtitles for 6. Power, Log, and Box-Cox Transformations

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic Download
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
fa Persian
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

So in this lecture, we are going to discuss some common at times serious transformations, if you're

familiar with machine learning, then you know that it's often useful to transform your data before

passing it into a machine learning model.

For example, standardization or min scaling four time series, we'll be discussing three common transformations

the power transform, the log transform and the Buzzcocks transform.

As you'll see, these all essentially serve the same purpose.

So let's start with the power transform, the power transform involves raising all your data points

to a power, for example, by raising every data point to the power of one half, you'll be taking the

square root of your data set.

So why is this useful?

Well, imagine that your data appears to grow quadratic in time.

If you take the square root, the result would be that you transform your data to grow linearly.

So why is that useful?

Well, you'll soon learn about some machine learning models that can learn linear trends very well,

but there's no model for quadratic trends or Kubic trends and so forth.

Thus, by transforming your data to appear like it has a linear trend, you give your model a better

chance of forecasting future data points and modeling the true nature of the Time series more closely.

So another transformation with a similar purpose is the log transform, like the power transform, it

basically ends up squashing your data into a smaller range.

In fact, a lot of the time I'll just end up using the log transform by default without considering

other options.

One common application of the log transform is in finance and finance.

It's common to model stock prices as following a normal distribution.

It's also common to model log returns instead of returns based on percentages.

As an example, this is the basis for the famous Black-Scholes formula.

Note that one possible issue with the log transform is that it doesn't accept zero or negative values

as input.

For this reason, it can only be used for data which is strictly positive for data that might be non-negative.

It's common to simply add one before taking the log.

OK, so a third transform we're going to discuss is the box cox transform, which generalises the concept

of both the power transform and the log transform.

You can see that it involves this parameter lambda, which is the power to use when taking the transform.

So why does this make sense?

This makes sense because the natural logarithm is actually the limit of this specific power transform

as the power approaches zero.

Now inside the box Cox function will automatically choose the value of Lambda for us.

So we don't need to worry about finding the optimal value ourselves.

But if you're interested in learning how this value is chosen, I'd encourage you to check out the CPA

documentation as well as this article I've included in extra reading tea.

So one common reason people give for why they use the Buzzcocks transform is that they want to make

the data normally distributed.

However, note that this motivation does not apply to Raw Time series.

So why is this?

Well, remember that Time series data is dynamic.

It changes in time.

It can have a trend.

So when you take time series data and plot a histogram hoping that it will be normal, this is actually

the wrong thing to do was discuss this more later in the course.

But in order to take data over time and plot its distribution or histogram, we need that data to be

stationary.

Stationary essentially means distribution doesn't change over time.

So why is this a requirement?

Well, imagine you have some data which simply follows a line that grows at a constant rate.

Does plotting the histogram of this data makes sense?

The answer is no.

What do we want this to be normally distributed?

The answer is no.

In fact, this data behaves much better with a linear trend.

The point of plotting a histogram is to understand the distribution of the data, but the distribution

at the bottom of this plot is clearly different from the distribution at the top of this plot.

Therefore, it makes no sense to mix this data together into a single histogram.

This does not tell us how the data is distributed.

The final topic I want to discuss in this lecture is why the log transform is deeply fundamental.

Not only is it useful mathematically, but it also seems to be part of nature itself.

One example of this is perception.

For example, although a normal conversation is ten thousand times louder than a whisper, it doesn't

have ten thousand times the effect on your senses.

That's why we use the decibel scale to measure sound, which is essentially a log transform.

Another example of how the logarithm seems to simply be a part of nature is how we as humans interpret

numbers.

For example, if you have one thousand dollars in the bank, then losing one thousand dollars would

be a pretty big deal.

But if you have one billion dollars in the bank, spending one thousand dollars on a pair of jeans would

feel completely normal.

Another way to think of this is imagine going from zero dollars in wealth to one million.

That's a pretty big jump.

How about one million to two million?

Although you still made the same amount of money, its utility is less so.

One might model the utility of wealth as the logarithm of the wealth and.

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