# Clustering Eras

**URL:** <https://forum.numer.ai/t/clustering-eras/4863>\
**Category:** Tournament\
**Created:** [January 28, 2022, 3:56am UTC](https://forum.numer.ai/t/clustering-eras/4863 "2022-01-28T03:56:20Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![sneaky](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sneaky](https://forum.numer.ai/u/sneaky)\
**Post date:** [January 30, 2022, 7:08pm UTC](https://forum.numer.ai/t/clustering-eras/4863/7 "2022-01-30T19:08:04Z")

</div>

Hi, I cluster eras by analyzing how well you can predict an era by overfit another era.  
The idea is: If you have an overfitted model to an era A and it is good at predicting an era B, then A and B should be similar.

How I do it:

1. Create one model per era and train it only on its era.
2. With every model predict every era.
3. Measure the correlations between the predictions and targets.
4. Create a matrix where each row is made of model correlations.

The matrix of correlations between eras sorted by era number:

 ![usefullness_of_eras1](https://canada1.discourse-cdn.com/flex009/uploads/numerai/original/2X/8/8a0e0f2ca308266a760a328d46226e882058d1c3.png)

After a little bit of preprocessing and dimensionality reduction I cluster them.  
I played with different number of clusters and came up with 5,3, and lastly 4 being the best.

The next picture has same values as the first one, but now its sorted by cluster and number of an era within a cluster. That’s why you can see square patterns (clusters), and the waves across the squares (eras tend to be similar to eras that are timewise close to them)

 ![usefullness_of_eras2](https://canada1.discourse-cdn.com/flex009/uploads/numerai/original/2X/f/f09436174ff51299fec0f27db2d68d8479dc9ade.png)

I am currently working on a model that would harvest this knowledge, so far it was better to use era boosting method. The era boosting method does a similar thing, but it better targets the weaknesses of a little-meta model. With the new data I have more success but the computations take a lot of time, I hope it will be worth it at the end :).

I trained 3 models on 3 clusters (now I use 4) separately to see how they would do over time, and it seems that they nicely complement each other; therefore, if I am able to guess when to use which…

 ![Screenshot from 2022-01-30 19-58-03](https://canada1.discourse-cdn.com/flex009/uploads/numerai/original/2X/6/618f848a3726af514574e6bd8b070f7787018101.png)

Now I am working on meta model that would predict which era is which, thus would not need a target to classify tournament eras.

---

_[View the full topic](https://forum.numer.ai/t/clustering-eras/4863)._
