AI Cartoons (@aicartoons) header
AI Cartoons (@aicartoons) profile picture

Illustrations of computers and computers learning.

Joined December 2019
Replying to @theptrk
11/x Gradient Descent in Practice I - Feature Scaling teapawt.org/aicartoons/status/1411…
In Week 2 Andrew Ng touches upon “feature scaling”. This is important in models such as linear regression when the magnitude of features have the chance of having an outsized impact on the outputs. Two options: 1. feature scaling 2. mean normalization
1
1
I keep hearing about XGBoost (EXTREME gradient boousting). Time to learn what @tqchenml was cooking up.
1
4
Here is the V2 version of the notes with handwritten notes turned to text! ✍️ ➡ 👨‍💻 Notes on Andrew Ng Machine Learning course on #coursera theptrk.com/2021/09/14/carto…
1
1
Week 5: Backpropagation Algorithm. We use the delta terms we calculated for every hidden layer and multiply them by the activations to get the partial derivative. For many training examples our theta is nudged by the average of these.
Week 5 Backprop, we learn how the ”delta” error terms start with the output layer subtracted by the y labels and then delta is propagated back to all hidden layers
1
1
Week 5: Backpropagation Algorithm. We know how to forward prop, now we update the theta weights to minimize cost with backpropagation. Note the tie fixing 🎀
1
1
Week 5 Andrew Ng introduces the Neural Network cost function, a generalized version of the logistic cost function but for multiple outputs and multidimensional theta
1
1
In week 4 Andrew Ng explains how to build complex functions such as ”XOR” (exclusive OR) and “XNOR” (the opposite/inverse of XOR) using smaller building blocks like AND, OR, and NOT.
1
1
1
oops, these drawings are backwards
1
In W4 Multi-class classification we learn that your NN can output to multiple nodes and this vector represents different classes based on a single positive value
1
1
Week 4 we note that with logistic regression 📈we are given features. With NN’s 🧠its as if its learning its own features🤯until that last layer that looks just like logistic regression.
1
1
In week 4 Andrew Ng shows the vectorized implementation of forward propagation, this is a good shorthand for our notation but a BIG speed up in calculations since computers are SUPER good at matrix math.
1
2
Week 4 we see the model representation and it reminds us of logistic regression but now each layer outputs to many different “neurons“ (”activation units”) so theta is a matrix at each layer to the next. (instead of a 1D vector)
1
1
In Week 4 we learn about neural networks for learning non-linear representations. These are inspired by the interconnectedness of neurons in the brain.
1
1
Week 3; We also look at OVERfitting. It seems to do a good job of fitting the training set but its not a model that “generalizes” well to new data. This is “high variance“. Ng imagines a high order polynomial function that tries too hard to fit the training set.
In Week 3 we look at underfitting. In underfitting, our model has “high bias”. It’s as if our model has a preconception of our data despite the evidence and this causes a poor fit. Ng, imagines our model trying to fit a straight line to the data regardless of the real shape.
1
1
Week 3 we learn to deal with multi-class classification. We already now what do in “binary classification”. If we had 3 classes we could turn this into three different binary classification problems and use what we already know.
1
1
Week 3 gradient descent, remember what multiple parameters, in this lesson, we are doing simultaneous updates.
1
2
In Week 3 Andrew Ng shows that logistic regression has a different cost function, but we can still run gradient descent. If each gradient step were a boat, we‘d take boats all the way to minimum.
1
1
Week 3 cost function. Lets clear up common confusion around the ”1 - hθ(x)”. Since hθ(x) is between 0 and 1, that equation symmetrically the graph of the cost function so a prediction of 1 can cost 0 or approach infinity based on y
Week 3 Cost function. We want to make it costly to make mistakes. So if two parameters are being compared, cost should approach infinity as our model is more incorrect.