#62 Pandas (Part 39): Calculate Exponential Weighted Mean, Variance and Std. in Python | Tutorial

preview_player
Показать описание
The video discusses how to calculate Exponential Weighted Mean or Exponential Moving Average, Variance and Standard Deviation in Python by two methods: Directly using Pandas .ewm() and manually writing the code.

Timeline
(Python 3.7)

00:00 - Welcome
00:09 - Outline of video
00:38 - Open Jupyter notebook
00:46 - Data
00:59 - Initialize variables: span, alpha
02:06 - ----------- CORRECTION: -------- I meant to say 'w' and not 'v' or 'u
02:26 - Directly calculate exponential weighted mean: using: .ewm().mean()
02:50 - Directly calculate exponential weighted variance: using: .ewm().var()
03:00 - Directly calculate exponential weighted standard deviation: using: .ewm().std()
03:43 - Manually calculate exponential weighted items: initialize empty list
04:25 - Manually calculate exponential weighted items: BEGIN for_loop
04:46 - Manually calculate exponential weighted items: get window data points 05:27 - Manually calculate exponential weighted items: get weights
06:36 - Manually calculate exponential weighted items: mean
07:37 - Manually calculate exponential weighted items: bias
08:36 - Manually calculate exponential weighted items: variance
10:14 - Manually calculate exponential weighted items: standard deviation
11:31 - Manually calculate exponential weighted items: append to list
12:05 - Manually calculate exponential weighted items: END for_loop
12:15 - Add all calculated values to the DataFrame
14:09 - Run the code and discuss
15:50 - Ending notes
Рекомендации по теме