Let us consider a very simple Image Dataset, the Fashion MNIST dataset, which has thousands of images of fashion apparel.
Using PCA we can reduce the amount of information that we want, we can choose up to a certain amount that seems necessary for our particular task.
It still would have a lot of the information of the entire dataset.
We fit the PCA, and it breaks down the image information in terms of several components. We can try with 4 components here.
We can try different numbers of components and see how many are enough for our case.
Here we can think of the variance explained by each component in the images as the measure of information.
We can see for each component how much information it is capturing in multiple ways.
Here's a bar chart with the y-axis showing the variance for each component.
In above bar chart the components show around 29, 18, 6, and 5 explained variance
Cumulative Sum can be used to show that if we combine them then how much of the variance in total we would be able to explain.
Here's a line plot with individual and cumsum variance explained.
Now we can see in total we are able to explain about 58% of the variance by just 4 components
We can visualize each of them in terms of the images as well.
This would give us a better idea of the features from the images that are being captured by those components.
In the first component, we can see the shirt-like feature captured which is so common in the data.
And a very transparent shape for the shoe, hinting at some of the footwear variances captured.
Here's the entire code snippet for PCA and the plots.
Hope this helps!👍
• • •
Missing some Tweet in this thread? You can try to
force a refresh
If you don't understand the principle of Backpropagation or the notion of the maths behind it.
Then this 🧵 could be helpful for you.
We are going to use a simple analogy to understand better
(Check final tweets for notes)
↓ 1/11
Consider you (Harry) are trying to solve a puzzle along with two of your friends, Tom and Dick
And sadly none of you guys are among the brightest.
But you start trying to put the puzzle together.
2/11
Tom has put the first 6 pieces out of 20, 2 of them are wrong, then passes the puzzle to Dick.
Dick puts the next 8 pieces, 6 of them wrong, then passes the puzzle to you.
And now, you put the final 6 pieces, 4 of them wrong.
I've had a lot of trouble understanding different convolutions
What do different convolutions do anyway❓
Without the correct intuition, I found defining any CNN architecture very unenjoyable.
So, here's my little understanding (with pictures)🖼👇
The Number associated with the Convolution signifies two things:
🔸The number of directions the filter moves in and,
🔸The dimensions of the output
Each convolution expects different shapes of inputs and results in output equal to the dimensions it allows the filter to move in.
In 1⃣D-Conv, the kernel moves along a single axis.
It is generally applied over the inputs that also vary along a single dimension, ex: electric signal.
The input could be a 1D array and a small 1D kernel can be applied over it to get another 1D array as output.
If you just focus on the left side, it seems to make sense.
The training loss going down, the validation loss going up.
Clearly, seems to be an overfitting problem? Right?
But the graphs on the right don't seem to make sense in terms of overfitting.
The training accuracy is high, which is fine, but why is that validation accuracy is going up if the validation loss is getting worse, shouldn't it go down too?