On Thu, Oct 23, 2008 at 6:09 PM, Otis Gospodnetic
<[EMAIL PROTECTED]> wrote:
> DataModel model = new FileDataModel(new File("/tmp/input.txt"));
> recommender = new GenericItemBasedRecommender(model, new
> TanimotoCoefficientSimilarity(model));
> recommender = new CachingRecommender(recommender)
OK in this case by far the best speedup I can imagine is by
specializing the framework for the "boolean" case you have. Right now,
the framework assumes every pref has a value, but in your case it's
just a yes/no. The generalized framework does almost nothing to take
advantage of it. It offers a "BooleanPreference" object which would at
least save you storing a redundant "1.0" in every pref object. But
you'd have to make a slightly customized FileDatamodel to use it.
That's not hard. If you're willing to modify the code, there is far
more you can do to take advantage of this situation, that is also not
hard. my only quandary is how to include these in the general
framework, without just copying and pasting everything. That's the
only hold up.
If you want to go this route, customization, at least just to try it,
I am most happy to help. You can save a ton of memory for your case.
> Aha, Rescorer sounds useful. But say your rescoring logic requires
> additional data, such as item publishing date or item price or whatever.
> Where does such data enter the system?
> Does one then have to have custom Item implementation? And then that implies
> having a custom DataModel?
Yes you must write an implementation of Rescorer, and you do whatever
you like to access data and write whatever logic you like. No you
don't need a custom Datamodel. Rescorer gets an item and current score
and you can just twiddle it however you like. You can return NaN to
drop an item from consideration.