# Some info on multiple targets?

**URL:** <https://forum.numer.ai/t/some-info-on-multiple-targets/5606>\
**Category:** Tournament\
**Created:** [July 28, 2022, 6:30am UTC](https://forum.numer.ai/t/some-info-on-multiple-targets/5606 "2022-07-28T06:30:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![taori](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@taori](https://forum.numer.ai/u/taori)\
**Post date:** [July 28, 2022, 6:30am UTC](https://forum.numer.ai/t/some-info-on-multiple-targets/5606/1 "2022-07-28T06:30:46Z")

</div>

I didn’t find much information (nothing at all) regarding the multiple targets in the official documentation. I would like to know in which way they differ (except the 20 vs 60 days difference, which is clear). Does anybody know something on this topic? Thanks.

---

<div class="post-metadata">

**Author:** ![wigglemuse](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/wigglemuse/32/3094_2.png) [@wigglemuse](https://forum.numer.ai/u/wigglemuse)\
**Post date:** [July 28, 2022, 1:21pm UTC](https://forum.numer.ai/t/some-info-on-multiple-targets/5606/2 "2022-07-28T13:21:01Z")

</div>

Nobody knows! They are neutralized to different things and some such is about all the explanation we’ve gotten. Testing shows that at least several of them are pretty useful though.

---

<div class="post-metadata">

**Author:** ![autratec](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@autratec](https://forum.numer.ai/u/autratec)\
**Post date:** [July 29, 2022, 3:27am UTC](https://forum.numer.ai/t/some-info-on-multiple-targets/5606/3 "2022-07-29T03:27:23Z")

</div>

you might come out your own assumption and test whether it aligned with the target they provided. let’s say market moving up more than 1% with 0.75 and move down 1% with 0.25.

---

<div class="post-metadata">

**Author:** ![taori](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@taori](https://forum.numer.ai/u/taori)\
**Post date:** [August 25, 2022, 9:37pm UTC](https://forum.numer.ai/t/some-info-on-multiple-targets/5606/4 "2022-08-25T21:37:26Z")

</div>

[This](http://forum.numer.ai/t/generating-feature-groups/4744/12) post made me curious and so here is the correlation matrix between targets and the dendrogram to better highlight relationships.

 ![Figure_1](https://canada1.discourse-cdn.com/flex009/uploads/numerai/original/2X/4/404b87d1da36118ebc3260966cb8d5c6bccdb96b.png)

 ![Figure_2](https://canada1.discourse-cdn.com/flex009/uploads/numerai/original/2X/d/d5de53d8e61894c470ab6e416029f5e1e706db4d.png)

Here is the code.

```auto
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt

targets = [
    'target_nomi_v4_20',
    'target_nomi_v4_60',
    'target_jerome_v4_20',
    'target_jerome_v4_60',
    'target_janet_v4_20',
    'target_janet_v4_60',
    'target_ben_v4_20',
    'target_ben_v4_60',
    'target_alan_v4_20',
    'target_alan_v4_60',
    'target_paul_v4_20',
    'target_paul_v4_60',
    'target_george_v4_20',
    'target_george_v4_60',
    'target_william_v4_20',
    'target_william_v4_60',
    'target_arthur_v4_20',
    'target_arthur_v4_60',
    'target_thomas_v4_20',
    'target_thomas_v4_60']

# analyse the validation data, but we could do the same on the training data
df = pd.read_parquet('v4/validation.parquet', columns=targets + ['era'])

# compute the mean of the era correlation of every target with any other target
corr = df.groupby('era').corr(method='spearman').mean(axis=0, level=1)

# arrange the order of the columns and rows (for visualization) so that they
# are sorted by correlation with the target 'target_nomi_v4_20' 
corr = corr.sort_values(
    'target_nomi_v4_20',
    axis=0,
    ascending=False).sort_values(
        'target_nomi_v4_20',
        axis=1,
    ascending=False)

sns.heatmap(corr, annot=True)
plt.show()

sns.clustermap(corr)
plt.show()

```

---

<div class="post-metadata">

**Author:** ![ryo\_matsuzaka](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/ryo_matsuzaka/32/3049_2.png) [@ryo\_matsuzaka](https://forum.numer.ai/u/ryo_matsuzaka)\
**Post date:** [September 19, 2022, 10:57pm UTC](https://forum.numer.ai/t/some-info-on-multiple-targets/5606/5 "2022-09-19T22:57:31Z")

</div>

Sorry, it could be a basic question but I don’t understand why there are multiple targets…  
When doing training and prediction, we need to choose a target.

For example, the example code chooses a “target\_nomi\_v4\_20”.

> <https://github.com/numerai/example-scripts/blob/838bfd1788feaf40362d6bedb3e4683832a9dbb1/utils.py#L10>

But I don’t understand why “target\_nomi\_v4\_20” is chosen.  
How could it be selected? Is there any rule or a criteria?

---

<div class="post-metadata">

**Author:** ![thedarklord](https://avatars.discourse-cdn.com/v4/letter/t/e47c2d/32.png) [@thedarklord](https://forum.numer.ai/u/thedarklord)\
**Post date:** [September 20, 2022, 1:38am UTC](https://forum.numer.ai/t/some-info-on-multiple-targets/5606/6 "2022-09-20T01:38:09Z")

</div>

As I far as I understand, we are trying to predict the ‘target’. However, the other targets provided can do a better job at the predicting the ‘target’ than the ‘target’ itself. Sounds confusing, right? Basically, it means we can use one of other targets, say ‘target\_nomi\_v4\_20’ to train the model. And them use the trained model, which was trained using ‘target\_nomi\_v4\_20’ as Y, to predict ‘target’.

---

<div class="post-metadata">

**Author:** ![ryo\_matsuzaka](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/ryo_matsuzaka/32/3049_2.png) [@ryo\_matsuzaka](https://forum.numer.ai/u/ryo_matsuzaka)\
**Post date:** [September 20, 2022, 2:02am UTC](https://forum.numer.ai/t/some-info-on-multiple-targets/5606/7 "2022-09-20T02:02:34Z")

</div>

Yes, it is very confusing…  
But now I understood it. I will play with those targets.  
Thank you very much.

---

<div class="post-metadata">

**Author:** ![ryo\_matsuzaka](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/ryo_matsuzaka/32/3049_2.png) [@ryo\_matsuzaka](https://forum.numer.ai/u/ryo_matsuzaka)\
**Post date:** [September 20, 2022, 2:11am UTC](https://forum.numer.ai/t/some-info-on-multiple-targets/5606/8 "2022-09-20T02:11:37Z")

</div>

Sorry, but still I don’t understand the targets.  
Targets consists of the limited sets of discrete numbers.  
So I will use classifier not regresser for predictions.  
But then some targets(`target_brabra`) don’t have the value in the `target`.

---

<div class="post-metadata">

**Author:** ![wigglemuse](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/wigglemuse/32/3094_2.png) [@wigglemuse](https://forum.numer.ai/u/wigglemuse)\
**Post date:** [September 20, 2022, 2:15am UTC](https://forum.numer.ai/t/some-info-on-multiple-targets/5606/9 "2022-09-20T02:15:16Z")

</div>

target\_nomi\_v4\_20 actually is the “target” that we are scored on (for correlation). But sounds like they have their sights on jerome\_60 for the future maybe. (20 = day targets, 60 = 60 day targets).

And the targets are in buckets just like the features (except the distributions are different). In most cases you’ll find a regression approach working better – at least for getting correlation. (Your submission should be real-valued – not just the 5 buckets. We are scored on ranking/ordering, not actual values.)

It should be pointed out that TC evaluation is based on portfolio returns of your model vs others and so kinda doesn’t have a fixed target. Another reason to mix it up.

---

<div class="post-metadata">

**Author:** ![ryo\_matsuzaka](https://yyz1.discourse-cdn.com/flex009/user_avatar/forum.numer.ai/ryo_matsuzaka/32/3049_2.png) [@ryo\_matsuzaka](https://forum.numer.ai/u/ryo_matsuzaka)\
**Post date:** [September 20, 2022, 2:24am UTC](https://forum.numer.ai/t/some-info-on-multiple-targets/5606/10 "2022-09-20T02:24:14Z")

</div>

@wigglemuse  
Thank you very much for the information and advice.  
I completely understand it.

> In most cases you’ll find a regression approach working better – at least for getting correlation. (Your submission should be real-valued – not just the 5 buckets. We are scored on ranking/ordering, not actual values.)

I agree with you.

---

<div class="post-metadata">

**Author:** ![taori](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@taori](https://forum.numer.ai/u/taori)\
**Post date:** [September 20, 2022, 8:31am UTC](https://forum.numer.ai/t/some-info-on-multiple-targets/5606/11 "2022-09-20T08:31:56Z")

</div>

@ryo_matsuzaka Just to make your life easier, train your model multiple times, each time with a different target. Then create one model slot in your numer.ai account for each target so that you can submit the predictions coming from models trained on different targets to different slot. Then observe which target gives you better results and stake on it.
