giuliowaitforitdavide / recsyslearn

GNU General Public License v3.0
7 stars 0 forks source link

[bug] Setting rank equal to group when calculating novelty? #4

Closed mmosc closed 2 years ago

mmosc commented 2 years ago

Hi @giuliowaitforitdavide, me again :sweat_smile:

Why do you substitute the rank in the ranked list with the group when computing novelty? Shouldn't this

top_n.loc[:, 'rank'] = pd.to_numeric(top_n.loc[:,'group'])
top_n = top_n.groupby('user')['rank'].apply(lambda x: - np.log2(1 / x))

be

top_n.loc[:, 'group'] = pd.to_numeric(top_n.loc[:,'group'])
top_n = top_n.groupby('user')['group'].apply(lambda x: - np.log2(1 / x))

?

I know that in the end the result is the same, but this helps understanding the code. Cheers! Marta

giuliowaitforitdavide commented 2 years ago

I think that developing at 12 AM has its issues :laughing: That's right and I merged it with main