zenogantner / MyMediaLite

recommender system library for the CLR (.NET)
http://mymedialite.net
499 stars 192 forks source link

Incremental support for ItemKNN and UserKNN item recommenders (revisited) #386

Closed joaoms closed 11 years ago

joaoms commented 11 years ago

Hi there,

I guess this is better now.

Original message:

Hi,

I managed to add support for incremental updates to classic item recommenders (UserKNN and ItemKNN).

Class hierarchy changes:

KNN is now subclass of IncrementalItemRecommender

Limitations:

Only works with cosine and cooccurrence correlations
Slow neighbor retraining (though with some selectiveness)
Not "bullet proof" tested, maybe some bugs are still present
[SOLVED] Lots of commits for rather few changes (i'm still new to git, sorry about that)

Literature: http://www.springerlink.com/index/861k581047371165.pdf (no free pdf here...) https://www.forth.gr/ics/isl/publications/paperlink/LNCS_Formatted_ISMIS-05_34880553.pdf

Please send you comments. Regards, João Vinagre

zenogantner commented 11 years ago

Hi João,

thank you! This looks much better. One more thing -- this won't keep me from merging, but that you know for the next pull request -- sometimes you use "if(" instead of "if (" and "foreach(" instead of "foreach (".

joaoms commented 11 years ago

Sorry about my nasty coding habits.. :) Meanwhile i added an extra commit removing a few lines of code that i forgot there.. Thanks

zenogantner commented 11 years ago

If you don't mind, you can also fix the if( and foreach( stuff I mentioned above - this would also keep the history cleaner ;-)

joaoms commented 11 years ago

I think this is it. If you need anything else, please tell me about it :)