# Understanding Exponentially Weighted Averages (C2W2L04) | Summary and Q&A

65.6K views
August 25, 2017
by
DeepLearningAI
Understanding Exponentially Weighted Averages (C2W2L04)

## TL;DR

Exponentially weighted averages are a key component of optimization algorithms used in training neural networks.

## Key Insights

• 🏋️ Exponentially weighted averages are a crucial component of optimization algorithms used for training neural networks.
• 🥳 The beta value determines the number of days the average focuses on, with higher values resulting in longer averaging periods.
• 🍹 The algorithm computes averages by multiplying the current temperature with a decay function and summing them up.
• 💨 Exponentially weighted averages provide a memory-efficient and computationally efficient way to compute averages.
• 🍹 The decay function used in the algorithm results in a weighted sum or average of the temperature data.
• 🥳 It takes approximately ten days for the weight of a temperature to decay to around one-third of the current day's weight when beta is equal to 0.9.
• 🥳 A rule of thumb for the number of days the average represents is 1 over 1 minus beta.

## Transcript

in the last video we talked about exponentially weighted averages this will turn out to be a key component of several optimization algorithms that you use to train your neural networks so in this video I want to delve a little bit deeper into intuitions for what this algorithm is really doing recall that distance the key equation for implementing e... Read More

### Q: How does the exponentially weighted average algorithm compute averages of temperature data?

The algorithm takes the product of the current temperature and the decay function, summing them up to compute the average. The decay function weights each temperature based on its recency, giving more importance to recent temperatures.

### Q: What does the value of beta in the algorithm represent?

Beta (the decay factor) determines the number of days the average focuses on. A higher beta value, such as 0.9, indicates that the average focuses on the last 10 days of temperature data.

### Q: How efficient is the implementation of exponentially weighted averages?

The implementation is very efficient, requiring minimal memory and computation. It only needs to store one real number and update it based on the latest temperature value.

### Q: Are exponentially weighted averages the most accurate way to compute an average?

No, directly summing the last N days' temperatures and dividing by N generally provides a more accurate estimate. However, this approach requires more memory and is computationally more expensive.

## Summary & Key Takeaways

• Exponentially weighted averages compute averages of temperature data using a decay function, where the weight decreases exponentially with time.

• The algorithm takes the product of the current temperature and the decay function, summing them up to compute the average.

• Beta (the decay factor) determines the number of days the average focuses on, with a larger beta value indicating a longer averaging period.