When we start with machine learning, we learn to split our datasets in testing and training by taking a percentage of the data.
Unfortunately, this practice could lead to overestimating the performance of your model.
↓ 1/7
Imagine a dataset of pictures with people doing signals with their hands.
As we were told, we take 70% of the images for training and the remaining 30% for testing. We are careful to maintain the original ratio between classes.
How could this be a problem?
↓ 2/7
There are a lot of pictures of Mary in the dataset. She is showing different signals with her hands.
Also Joe. He was a model too that participated in the creation of the dataset.
Coming soon, in Python 🐍 3.10: "Pattern Matching."
Looks sick!
No, this is not a switch statement. Pattern matching is very different.
With patterns, you get a small language to describe the structure of the values you want to match. Look at one of the examples to see how you can match an element of a tuple.
You can use patterns to match even more complex structures. You can nest them. You can have redundancy checking.
Pattern matching is a feature you can find in functional languages.
It's excellent that Python decided to add it! I'm really excited about it.