Hi LazyProgrammer,

I was at the code implementation glove in code with Alternating Least Squares lecture (lecture 9), I think you might have a mistake in terms of updating bias term b and c. I'll use b term to illustrate my point. Since typing for equation on this one is very hard, I wrote my derivation on paper. Please have a look.

Generally speaking, I think the mistake that you might have is that you assumed there is a SUM(f(i,j)) term ahead of the "lambda*b(i)" term(i.e., the dashed box in my paper). Because if I derive the equation based on this assumption, I get what you get.

However, I don't think we should surround the "lambda*b(i)" term with SUM(f(i,j)), because we don't surround the regularization term with SUM at the very beginning of the derivation. When you did derivation including the regularization term in your video, you didn't surround the regularization term with SUM either.

Here is my derivation (upper half is my solution, lower half is yours), and I also attached a photo of your code implementation about this.

photo of your code about this part: https://ibb.co/MRS9FBy

my derivation: https://ibb.co/XYgB09N

Please let me know what you think. Thank you.

## There might be a mistake in your code

Return to “Natural Language Processing with Deep Learning in Python”

Jump to

- General Discussion
- ↳ General Discussion
- Course Q&As
- ↳ Deep Learning Prerequisites: The Numpy Stack in Python
- ↳ Deep Learning Prerequisites: Linear Regression in Python
- ↳ Deep Learning Prerequisites: Logistic Regression in Python
- ↳ Data Science: Deep Learning in Python
- ↳ Modern Deep Learning in Python
- ↳ Deep Learning: Convolutional Neural Networks in Python
- ↳ Unsupervised Deep Learning in Python
- ↳ Deep Learning: Recurrent Neural Networks in Python
- ↳ Data Analytics: SQL for newbs, beginners and marketers
- ↳ Data Science: Natural Language Processing (NLP) in Python
- ↳ Natural Language Processing with Deep Learning in Python
- ↳ Data Science: Supervised Machine Learning in Python
- ↳ Cluster Analysis and Unsupervised Machine Learning in Python
- ↳ Bayesian Machine Learning in Python: A/B Testing
- ↳ Unsupervised Machine Learning Hidden Markov Models in Python
- ↳ Ensemble Machine Learning in Python: Random Forest, AdaBoost
- ↳ Artificial Intelligence: Reinforcement Learning in Python
- ↳ Advanced AI: Deep Reinforcement Learning in Python
- ↳ Deep Learning: GANs and Variational Autoencoders
- ↳ Deep Learning: Advanced Computer Vision (Computer Vision Applications with Deep Learning)
- ↳ Deep Learning: Advanced NLP and RNNs (Advanced NLP and Sequence Models with Deep Learning)
- ↳ Recommender Systems and Deep Learning in Python (Recommender System Applications with Deep Learning)
- ↳ Machine Learning and AI: Support Vector Machines in Python
- ↳ Cutting-Edge AI: Deep Reinforcement Learning in Python
- ↳ MATLAB for Students, Engineers, and Professionals in STEM
- ↳ Tensorflow 2.0: Deep Learning and Artificial Intelligence
- ↳ PyTorch: Deep Learning and Artificial Intelligence
- ↳ Linear Programming for Linear Regression