The Power of 2 (but many times)
Decide this. By combining many different yes/no questions, chosen based on some metric, we can classify really complex entries.
Problem. Data is complex and messy. Rarely does a single metric capture the interplay of different deciding factors, which can lead to a model generalizing poorly. To help with this, we can use multiple trees! By making the trees vote, then we have a much more robust solution. Additionally, we can BOOST.
You are here
- Video
- MediaPipe
- TSFresh / PySPI
- FeatBoost
- XGBoost
Tree 1
What all trees together say
The forest so far (click a tree to look inside it)
Try this
- Pressing BOOST (this means create a tree that tries to get right what the previous got wrong).
- Make a more complex (more questions) tree, and make a lot of them. Can you think of any problems with this? We call this overfitting.
- Even in difficult cases, notice that you can get pretty good results very quickly.
I HATE VIDEO
Problem. Video sucks. It's large, and messy, and requires a lot of data. Instead, how about we use deep learning to not have to deal with it?
Answer. A pose model that was already trained on a very large number of people finds the body's keypoints in every frame. What is left is a set of keypoints over time that describe movement and nothing else.
You are here
- Video
- MediaPipe
- TSFresh / PySPI
- FeatBoost
- XGBoost
This is a real MediaPipe model running on your device!
One keypoint over the last 8 seconds
Try this
- Try coming close and far from the camera. MediaPipe does better and worse in some scenarios.
- Get multiple people in the frame and watch chaos ensue.
- Try an oscillatory movement, and try to identify it in the chart.
Raw movement sucks, actually
The Black Box. If you feed this data directly into XGBoost, what you will learn is coordinates: In a certain second, the hand is moving here. Imagine hundreds of questions asking this. This doesn't actually tell you anything about the movement.
Feature Generators. Instead, we can pre-process this data by transforming it into mathematical measurements with inherent meaning. We use two: TSFresh describes one keypoint at a time. PySPI describes how two keypoints relate. Every clip becomes one row of numbers, each with a meaning you can look up.
You are here
- Video
- MediaPipe
- TSFresh / PySPI
- FeatBoost
- XGBoost
| Measure | Clip A | Clip B |
|---|
This is a small subset of measures. In reality, I use ~1000 per keypoint, per task.
Okay, now read 100,000 entries bozo
Explainable isn't actually explainable. Silly you, you've now generated several hundreds of thousands of decision points that XGBoost has used happily. This, while technically explainable, is a pain for you and the model to decide through.
BOOST IT. We can make use of the same principle that XGBoost uses to select features: We train, then we pick the best feature. Then, we train again but increasing the weight of the things we got wrong before. We do this until we stop improving, and then we have a set of features we can use. This cuts about 99% of features!
You are here
- Video
- MediaPipe
- TSFresh / PySPI
- FeatBoost
- XGBoost
Feature list
The clips (bigger = gets more attention next round)
Accuracy on data the model has not seen
Best performers
- Nothing yet. Press BOOST.
Try this
- Regenerate the data and BOOST. Does the same short list come back? A stable list points to some pattern in the data rather than chance.
- What happens when the data is very similar?
- Look at the star. That's you!