Guess what the model learned... ๐
Dataset bias strikes again! ๐ฌ
This is a great example of dataset bias! This ML method classifies skin lesions as being malignant or not.
Can you see the problem from the examples? ๐ค
Let me shortly explain ๐
Guess what the model learned... ๐
"In our dataset, images with rulers were more likely to be malignant; thus the algorithm inadvertently โlearnedโ that rulers are malignant."
https://t.co/H00FFokKHr
More from Vladimir Haltakov
Imagine we want to detect all pixels belonging to a traffic light from a self-driving car's camera. We train a model with 99.88% performance. Pretty cool, right?
Actually, this model is useless โ
Let me explain ๐
The problem is the data is severely imbalanced - the ratio between traffic light pixels and background pixels is 800:1.
If we don't take any measures, our model will learn to classify each pixel as background giving us 99.88% accuracy. But it's useless!
What can we do? ๐
Let me tell you about 3 ways of dealing with imbalanced data:
โช๏ธ Choose the right evaluation metric
โช๏ธ Undersampling your dataset
โช๏ธ Oversampling your dataset
โช๏ธ Adapting the loss
Let's dive in ๐
1๏ธโฃ Evaluation metrics
Looking at the overall accuracy is a very bad idea when dealing with imbalanced data. There are other measures that are much better suited:
โช๏ธ Precision
โช๏ธ Recall
โช๏ธ F1 score
I wrote a whole thread on
How to evaluate your ML model? \U0001f4cf
— Vladimir Haltakov (@haltakov) August 31, 2021
Your accuracy is 97%, so this is pretty good, right? Right? No! \u274c
Just looking at the model accuracy is not enough. Let me tell you about some other metrics:
\u25aa\ufe0f Recall
\u25aa\ufe0f Precision
\u25aa\ufe0f F1 score
\u25aa\ufe0f Confusion matrix
Let's start \U0001f447
2๏ธโฃ Undersampling
The idea is to throw away samples of the overrepresented classes.
One way to do this is to randomly throw away samples. However, ideally, we want to make sure we are only throwing away samples that look similar.
Here is a strategy to achieve that ๐
Check out this thread for short reviews of some interesting Machine Learning and Computer Vision papers. I explain the basic ideas and main takeaways of each paper in a Twitter thread.
๐ I'm adding new reviews all the time! ๐
AlexNet - the paper that started the deep learning revolution in Computer Vision!
It's finally time for some paper review! \U0001f4dc\U0001f50d\U0001f9d0
— Vladimir Haltakov (@haltakov) September 28, 2020
I promised the other day to start posting threads with summaries of papers that had a big impact on the field of ML and CV.
Here is the first one - the AlexNet paper! pic.twitter.com/QNLPIMZSIa
DenseNet - reducing the size and complexity of CNNs by adding dense connections between layers.
ML paper review time - DenseNet! \U0001f578\ufe0f
— Vladimir Haltakov (@haltakov) October 15, 2020
This paper won the Best Paper Award at the 2017 Conference on Computer Vision and Pattern Recognition (CVPR) - the best conference for computer vision problems.
It introduces a new CNN architecture where the layers are densely connected. pic.twitter.com/DuHytaoXia
Playing for data - generating synthetic GT from a video game (GTA V) and using it to improving semantic segmentation models.
Time for another ML paper review - generating synthetic ground truth data from video games! \U0001f3ae
— Vladimir Haltakov (@haltakov) October 5, 2020
I love this paper, because it pushes the boundaries of creating realistic synthetic ground truth data and shows that you can use it for training and improve your model.
Details \U0001f447 pic.twitter.com/fBgORYG8Lz
Transformers for image recognition - a new paper with the potential to replace convolutions with a transformer.
Another paper review, but a little different this time... \U0001f937\u200d\u2642\ufe0f
— Vladimir Haltakov (@haltakov) October 5, 2020
The paper is not published yet, but is submitted for review at ICLR 2021. It is getting a lot of attention from the CV/ML community, though, and many speculate that it is the end of CNNs... \U0001f447https://t.co/bh6wUxYfxu pic.twitter.com/dZGBYB8A5U
More from All
You May Also Like
Once upon a time there was a Raja named Uttฤnapฤda born of Svayambhuva Manu,1st man on earth.He had 2 beautiful wives - Suniti & Suruchi & two sons were born of them Dhruva & Uttama respectively.
#talesofkrishna https://t.co/E85MTPkF9W
Prabhu says i reside in the heart of my bhakt.
— Right Singh (@rightwingchora) December 21, 2020
Guess the event. pic.twitter.com/yFUmbfe5KL
Now Suniti was the daughter of a tribal chief while Suruchi was the daughter of a rich king. Hence Suruchi was always favored the most by Raja while Suniti was ignored. But while Suniti was gentle & kind hearted by nature Suruchi was venomous inside.
#KrishnaLeela
The story is of a time when ideally the eldest son of the king becomes the heir to the throne. Hence the sinhasan of the Raja belonged to Dhruva.This is why Suruchi who was the 2nd wife nourished poison in her heart for Dhruva as she knew her son will never get the throne.
One day when Dhruva was just 5 years old he went on to sit on his father's lap. Suruchi, the jealous queen, got enraged and shoved him away from Raja as she never wanted Raja to shower Dhruva with his fatherly affection.
Dhruva protested questioning his step mother "why can't i sit on my own father's lap?" A furious Suruchi berated him saying "only God can allow him that privilege. Go ask him"
Covering one of the most unique set ups: Extended moves & Reversal plays
Time for a ๐งต to learn the above from @iManasArora
What qualifies for an extended move?
30-40% move in just 5-6 days is one example of extended move
How Manas used this info to book
The stock exploded & went up as much as 63% from my price.
— Manas Arora (@iManasArora) June 22, 2020
Closed my position entirely today!#BroTip pic.twitter.com/CRbQh3kvMM
Post that the plight of the
What an extended (away from averages) move looks like!!
— Manas Arora (@iManasArora) June 24, 2020
If you don't learn to sell into strength, be ready to give away the majority of your gains.#GLENMARK pic.twitter.com/5DsRTUaGO2
Example 2: Booking profits when the stock is extended from 10WMA
10WMA =
#HIKAL
— Manas Arora (@iManasArora) July 2, 2021
Closed remaining at 560
Reason: It is 40+% from 10wma. Super extended
Total revenue: 11R * 0.25 (size) = 2.75% on portfolio
Trade closed pic.twitter.com/YDDvhz8swT
Another hack to identify extended move in a stock:
Too many green days!
Read
When you see 15 green weeks in a row, that's the end of the move. *Extended*
— Manas Arora (@iManasArora) August 26, 2019
Simple price action analysis.#Seamecltd https://t.co/gR9xzgeb9K