You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Mark <st...@gmail.com> on 2011/03/14 16:27:12 UTC

PlusAnonymousUserDataModel

I have a some questions regarding the user of 
PlusAnonymousUserDataModel. As per the javadoc:

/DataModel realModel = ...;
DataModel plusModel = new PlusAnonymousUserDataModel(realModel);

ItemSimilarity similarity = new LogLikelihoodSimilarity(realModel); // 
not plusModel/

So I should be constructing my Similarity class using the original 
DataModel and not the PlusDataModel? Why is that? Also when constructing 
the Recommender should I be using the real DataModel or the PlusDataModel?

Thanks

Re: PlusAnonymousUserDataModel

Posted by Sean Owen <sr...@gmail.com>.
(Unless I am forgetting a reason it won't work at all,) The reason is just
that the temporary user is temporary and perhaps "unreliable" data as it is
gleaned from transient input from what you think is one user. So, might as
well not embed that data any deeper than necessary in the system.

It exists in the model because it has to for algorithms to make any sense of
it. It would have only a marginal impact on item-item similarity, so don't
bother there.

"Anonymous" here means "otherwise unknown to the DataModel". Whether they're
logged in or not doesn't matter in that sense.

On Mon, Mar 14, 2011 at 3:27 PM, Mark <st...@gmail.com> wrote:

> I have a some questions regarding the user of PlusAnonymousUserDataModel.
> As per the javadoc:
>
> /DataModel realModel = ...;
> DataModel plusModel = new PlusAnonymousUserDataModel(realModel);
>
> ItemSimilarity similarity = new LogLikelihoodSimilarity(realModel); // not
> plusModel/
>
> So I should be constructing my Similarity class using the original
> DataModel and not the PlusDataModel? Why is that? Also when constructing the
> Recommender should I be using the real DataModel or the PlusDataModel?
>
> Thanks
>

Re: PlusAnonymousUserDataModel

Posted by Sean Owen <sr...@gmail.com>.
Yes, a BooleanUserPreferenceArray is the best data structure here.

One thing I could do is change the API to make the difference between
the two less mistake-able -- perhaps a setAllUserIDs method and
setAllItemIDs method, only one of which would work for each of the two
variants. And then make individual setters fail appropriate -- can't
set user IDs individually in a user array, that sort of thing.

On Tue, Mar 15, 2011 at 11:48 PM, Mark <st...@gmail.com> wrote:
> Thank you so much. When I switched to a UserPreferenceArray instead of an
> ItemPreferenceArray everything worked. I messed up the naming
>
>
> On 3/15/11 4:33 PM, Chris Schilling wrote:
>>
>> Hello Mark,
>>
>> I might be able to help you with this code.  This will get an item based
>> recommender along with retrieving recommendations for a temp user.  I use a
>> loglikelihood similarity for boolean prefs.
>>
>> First, here is how I instantiate the data model:
>> dm = new PlusAnonymousUserDataModel(new FileDataModel(new File(baseDir +
>> "UserItemRating.txt")));
>>
>> So, UserItemRating is the file I read in:
>> userID,itemID,rating
>>
>> Here is my itemRecommender:
>> itemRecommender = new GenericItemRecommender(dataModel, new
>> LogLikelihoodSimilarity(dm));
>>
>> Here is the itemSimilarity:
>>
>> public static synchronized List<String>
>>  getRecommendations(Map<String,Float>  prefList, int howMany, String cftype)
>> throws TasteException {
>>        PreferenceArray anonArray = addTempPrefToDataModel(prefList);
>>        ((PlusAnonymousUserDataModel) dm).setTempPrefs(anonArray);
>>        List<RecommendedItem>  recommendations = null;
>>        recommendations =
>> itemRecommender.recommend(PlusAnonymousUserDataModel.TEMP_USER_ID, howMany);
>> }
>>
>> So, here prefList is a list of preferences for the temporary user, so a
>> map from userID to float rating (in my case).  If you are dealing with
>> Boolean preferences, then you could just set this to 1.  Whatever...
>>
>> Here is the function I use to setup the PreferenceArray:
>>
>>        public static PreferenceArray addTempPrefToDataModel(Map<String,
>> Float>  prefList) throws TasteException {
>>                PreferenceArray anonymousPrefs = new
>> GenericUserPreferenceArray(prefList.size());
>>                anonymousPrefs.setUserID(0,
>> PlusAnonymousUserDataModel.TEMP_USER_ID);
>>
>>                Iterator<Map.Entry<String, Float>>  it =
>> prefList.entrySet().iterator();
>>
>>                int i = 0;
>>                while(it.hasNext()) {
>>                        Map.Entry<String, Float>  pairs = it.next();
>>                        String itemID = (String) pairs.getKey();
>>                        long intID = Long.parseLong((String) ((TreeBidiMap)
>> CreateItemIDToIntMap.int_2_item_map).getKey(itemID));
>>                        Float val = (Float) pairs.getValue();
>>                        anonymousPrefs.setItemID(i, intID);
>>                        anonymousPrefs.setValue(i, val);
>>                        i++;
>>                }
>>
>>                return anonymousPrefs;
>>        }
>>
>>
>> On Mar 15, 2011, at 4:22 PM, Mark wrote:
>>
>>> I'm going crazy over here!
>>>
>>> Can someone please show me an example of a offering up anonymous
>>> recommendations using a GenericBooleanPrefItemBasedRecommender and
>>> LogLikelihoodSimilarity. I keep getting 0 results even though I set the
>>> anonymous users preferences to the same as one of my test users which
>>> receives multiple recommendations.
>>>
>>> public static void main(String[] args) throws IOException, TasteException
>>> {
>>>    DataModel realModel = new FileDataModel(new
>>> File("/usr/local/recommendations/dummy.data"));
>>>    PlusAnonymousUserDataModel plusModel = new
>>> PlusAnonymousUserDataModel(realModel);
>>>
>>>    ItemSimilarity similarity = new LogLikelihoodSimilarity(realModel);
>>>
>>>    Recommender recommender = new
>>> GenericBooleanPrefItemBasedRecommender(plusModel, similarity);
>>>
>>>    PreferenceArray anonymousPrefs = new GenericItemPreferenceArray(3);
>>>    anonymousPrefs.setItemID(0, 1);
>>>    anonymousPrefs.setUserID(0, PlusAnonymousUserDataModel.TEMP_USER_ID);
>>>    anonymousPrefs.setItemID(1, 2);
>>>    anonymousPrefs.setUserID(2, PlusAnonymousUserDataModel.TEMP_USER_ID);
>>>    anonymousPrefs.setItemID(2, 4);
>>>    anonymousPrefs.setUserID(2, PlusAnonymousUserDataModel.TEMP_USER_ID);
>>>
>>>    plusModel.setTempPrefs(anonymousPrefs);
>>>    List<RecommendedItem>  items =
>>> recommender.recommend(PlusAnonymousUserDataModel.TEMP_USER_ID, 10);
>>>    plusModel.clearTempPrefs();
>>>
>>>    for (RecommendedItem item : items) {
>>>      System.out.println(item);
>>>    }
>>>  }
>>>
>>> On 3/15/11 1:30 PM, Sean Owen wrote:
>>>>
>>>> Yes, should be fine.
>>>>
>>>> On Tue, Mar 15, 2011 at 6:59 PM, Mark<st...@gmail.com>
>>>> wrote:
>>>>>
>>>>> One last question. Will PlusAnonymousUserDataModel work with
>>>>> BooleanPreferences?
>>
>

Re: PlusAnonymousUserDataModel

Posted by Mark <st...@gmail.com>.
Thank you so much. When I switched to a UserPreferenceArray instead of 
an ItemPreferenceArray everything worked. I messed up the naming


On 3/15/11 4:33 PM, Chris Schilling wrote:
> Hello Mark,
>
> I might be able to help you with this code.  This will get an item based recommender along with retrieving recommendations for a temp user.  I use a loglikelihood similarity for boolean prefs.
>
> First, here is how I instantiate the data model:
> dm = new PlusAnonymousUserDataModel(new FileDataModel(new File(baseDir + "UserItemRating.txt")));
>
> So, UserItemRating is the file I read in:
> userID,itemID,rating
>
> Here is my itemRecommender:
> itemRecommender = new GenericItemRecommender(dataModel, new LogLikelihoodSimilarity(dm));
>
> Here is the itemSimilarity:
>
> public static synchronized List<String>  getRecommendations(Map<String,Float>  prefList, int howMany, String cftype) throws TasteException {
> 	PreferenceArray anonArray = addTempPrefToDataModel(prefList);
> 	((PlusAnonymousUserDataModel) dm).setTempPrefs(anonArray);
> 	List<RecommendedItem>  recommendations = null;
> 	recommendations = itemRecommender.recommend(PlusAnonymousUserDataModel.TEMP_USER_ID, howMany);
> }
>
> So, here prefList is a list of preferences for the temporary user, so a map from userID to float rating (in my case).  If you are dealing with Boolean preferences, then you could just set this to 1.  Whatever...
>
> Here is the function I use to setup the PreferenceArray:
>
> 	public static PreferenceArray addTempPrefToDataModel(Map<String, Float>  prefList) throws TasteException {
> 		PreferenceArray anonymousPrefs = new GenericUserPreferenceArray(prefList.size());
> 		anonymousPrefs.setUserID(0, PlusAnonymousUserDataModel.TEMP_USER_ID);
>
> 		Iterator<Map.Entry<String, Float>>  it = prefList.entrySet().iterator();
>
> 		int i = 0;
> 		while(it.hasNext()) {
> 			Map.Entry<String, Float>  pairs = it.next();
> 			String itemID = (String) pairs.getKey();
> 			long intID = Long.parseLong((String) ((TreeBidiMap) CreateItemIDToIntMap.int_2_item_map).getKey(itemID));
> 			Float val = (Float) pairs.getValue();
> 			anonymousPrefs.setItemID(i, intID);
> 			anonymousPrefs.setValue(i, val);
> 			i++;
> 		}
>
> 		return anonymousPrefs;
> 	}
>
>
> On Mar 15, 2011, at 4:22 PM, Mark wrote:
>
>> I'm going crazy over here!
>>
>> Can someone please show me an example of a offering up anonymous recommendations using a GenericBooleanPrefItemBasedRecommender and LogLikelihoodSimilarity. I keep getting 0 results even though I set the anonymous users preferences to the same as one of my test users which receives multiple recommendations.
>>
>> public static void main(String[] args) throws IOException, TasteException {
>>     DataModel realModel = new FileDataModel(new File("/usr/local/recommendations/dummy.data"));
>>     PlusAnonymousUserDataModel plusModel = new PlusAnonymousUserDataModel(realModel);
>>
>>     ItemSimilarity similarity = new LogLikelihoodSimilarity(realModel);
>>
>>     Recommender recommender = new GenericBooleanPrefItemBasedRecommender(plusModel, similarity);
>>
>>     PreferenceArray anonymousPrefs = new GenericItemPreferenceArray(3);
>>     anonymousPrefs.setItemID(0, 1);
>>     anonymousPrefs.setUserID(0, PlusAnonymousUserDataModel.TEMP_USER_ID);
>>     anonymousPrefs.setItemID(1, 2);
>>     anonymousPrefs.setUserID(2, PlusAnonymousUserDataModel.TEMP_USER_ID);
>>     anonymousPrefs.setItemID(2, 4);
>>     anonymousPrefs.setUserID(2, PlusAnonymousUserDataModel.TEMP_USER_ID);
>>
>>     plusModel.setTempPrefs(anonymousPrefs);
>>     List<RecommendedItem>  items = recommender.recommend(PlusAnonymousUserDataModel.TEMP_USER_ID, 10);
>>     plusModel.clearTempPrefs();
>>
>>     for (RecommendedItem item : items) {
>>       System.out.println(item);
>>     }
>>   }
>>
>> On 3/15/11 1:30 PM, Sean Owen wrote:
>>> Yes, should be fine.
>>>
>>> On Tue, Mar 15, 2011 at 6:59 PM, Mark<st...@gmail.com>   wrote:
>>>> One last question. Will PlusAnonymousUserDataModel work with
>>>> BooleanPreferences?
>

Re: PlusAnonymousUserDataModel

Posted by Chris Schilling <ch...@cellixis.com>.
Hello Mark,

I might be able to help you with this code.  This will get an item based recommender along with retrieving recommendations for a temp user.  I use a loglikelihood similarity for boolean prefs.  

First, here is how I instantiate the data model:
dm = new PlusAnonymousUserDataModel(new FileDataModel(new File(baseDir + "UserItemRating.txt")));

So, UserItemRating is the file I read in:
userID,itemID,rating  

Here is my itemRecommender:
itemRecommender = new GenericItemRecommender(dataModel, new LogLikelihoodSimilarity(dm));

Here is the itemSimilarity:

public static synchronized List<String> getRecommendations(Map<String,Float> prefList, int howMany, String cftype) throws TasteException {
	PreferenceArray anonArray = addTempPrefToDataModel(prefList);
	((PlusAnonymousUserDataModel) dm).setTempPrefs(anonArray);
	List<RecommendedItem> recommendations = null;
	recommendations = itemRecommender.recommend(PlusAnonymousUserDataModel.TEMP_USER_ID, howMany);
}

So, here prefList is a list of preferences for the temporary user, so a map from userID to float rating (in my case).  If you are dealing with Boolean preferences, then you could just set this to 1.  Whatever...

Here is the function I use to setup the PreferenceArray:

	public static PreferenceArray addTempPrefToDataModel(Map<String, Float> prefList) throws TasteException {
		PreferenceArray anonymousPrefs = new GenericUserPreferenceArray(prefList.size());
		anonymousPrefs.setUserID(0, PlusAnonymousUserDataModel.TEMP_USER_ID);

		Iterator<Map.Entry<String, Float>> it = prefList.entrySet().iterator();

		int i = 0;
		while(it.hasNext()) {
			Map.Entry<String, Float> pairs = it.next();
			String itemID = (String) pairs.getKey();
			long intID = Long.parseLong((String) ((TreeBidiMap) CreateItemIDToIntMap.int_2_item_map).getKey(itemID));
			Float val = (Float) pairs.getValue();
			anonymousPrefs.setItemID(i, intID);
			anonymousPrefs.setValue(i, val);
			i++;
		}

		return anonymousPrefs;
	}


On Mar 15, 2011, at 4:22 PM, Mark wrote:

> I'm going crazy over here!
> 
> Can someone please show me an example of a offering up anonymous recommendations using a GenericBooleanPrefItemBasedRecommender and LogLikelihoodSimilarity. I keep getting 0 results even though I set the anonymous users preferences to the same as one of my test users which receives multiple recommendations.
> 
> public static void main(String[] args) throws IOException, TasteException {
>    DataModel realModel = new FileDataModel(new File("/usr/local/recommendations/dummy.data"));
>    PlusAnonymousUserDataModel plusModel = new PlusAnonymousUserDataModel(realModel);
> 
>    ItemSimilarity similarity = new LogLikelihoodSimilarity(realModel);
> 
>    Recommender recommender = new GenericBooleanPrefItemBasedRecommender(plusModel, similarity);
> 
>    PreferenceArray anonymousPrefs = new GenericItemPreferenceArray(3);
>    anonymousPrefs.setItemID(0, 1);
>    anonymousPrefs.setUserID(0, PlusAnonymousUserDataModel.TEMP_USER_ID);
>    anonymousPrefs.setItemID(1, 2);
>    anonymousPrefs.setUserID(2, PlusAnonymousUserDataModel.TEMP_USER_ID);
>    anonymousPrefs.setItemID(2, 4);
>    anonymousPrefs.setUserID(2, PlusAnonymousUserDataModel.TEMP_USER_ID);
> 
>    plusModel.setTempPrefs(anonymousPrefs);
>    List<RecommendedItem> items = recommender.recommend(PlusAnonymousUserDataModel.TEMP_USER_ID, 10);
>    plusModel.clearTempPrefs();
> 
>    for (RecommendedItem item : items) {
>      System.out.println(item);
>    }
>  }
> 
> On 3/15/11 1:30 PM, Sean Owen wrote:
>> Yes, should be fine.
>> 
>> On Tue, Mar 15, 2011 at 6:59 PM, Mark<st...@gmail.com>  wrote:
>>> One last question. Will PlusAnonymousUserDataModel work with
>>> BooleanPreferences?


Re: PlusAnonymousUserDataModel

Posted by Mark <st...@gmail.com>.
I'm going crazy over here!

Can someone please show me an example of a offering up anonymous 
recommendations using a GenericBooleanPrefItemBasedRecommender and 
LogLikelihoodSimilarity. I keep getting 0 results even though I set the 
anonymous users preferences to the same as one of my test users which 
receives multiple recommendations.

public static void main(String[] args) throws IOException, TasteException {
     DataModel realModel = new FileDataModel(new 
File("/usr/local/recommendations/dummy.data"));
     PlusAnonymousUserDataModel plusModel = new 
PlusAnonymousUserDataModel(realModel);

     ItemSimilarity similarity = new LogLikelihoodSimilarity(realModel);

     Recommender recommender = new 
GenericBooleanPrefItemBasedRecommender(plusModel, similarity);

     PreferenceArray anonymousPrefs = new GenericItemPreferenceArray(3);
     anonymousPrefs.setItemID(0, 1);
     anonymousPrefs.setUserID(0, PlusAnonymousUserDataModel.TEMP_USER_ID);
     anonymousPrefs.setItemID(1, 2);
     anonymousPrefs.setUserID(2, PlusAnonymousUserDataModel.TEMP_USER_ID);
     anonymousPrefs.setItemID(2, 4);
     anonymousPrefs.setUserID(2, PlusAnonymousUserDataModel.TEMP_USER_ID);

     plusModel.setTempPrefs(anonymousPrefs);
     List<RecommendedItem> items = 
recommender.recommend(PlusAnonymousUserDataModel.TEMP_USER_ID, 10);
     plusModel.clearTempPrefs();

     for (RecommendedItem item : items) {
       System.out.println(item);
     }
   }

On 3/15/11 1:30 PM, Sean Owen wrote:
> Yes, should be fine.
>
> On Tue, Mar 15, 2011 at 6:59 PM, Mark<st...@gmail.com>  wrote:
>> One last question. Will PlusAnonymousUserDataModel work with
>> BooleanPreferences?

Re: PlusAnonymousUserDataModel

Posted by Sean Owen <sr...@gmail.com>.
Yes, should be fine.

On Tue, Mar 15, 2011 at 6:59 PM, Mark <st...@gmail.com> wrote:
> One last question. Will PlusAnonymousUserDataModel work with
> BooleanPreferences?

Re: PlusAnonymousUserDataModel

Posted by Mark <st...@gmail.com>.
One last question. Will PlusAnonymousUserDataModel work with 
BooleanPreferences?

On 3/15/11 11:15 AM, Sean Owen wrote:
> You don't need 2, no. The data model wrapper doesn't have any effect
> unless dealing with that anonymous user.
>
> On Tue, Mar 15, 2011 at 6:13 PM, Mark<st...@gmail.com>  wrote:
>> Thats correct.
>>
>> Ok if I use the plusOneModel as the model for my recommender is it OK to use that recommender for normal recommendations? IE... should I have 2 recommender classes?

Re: PlusAnonymousUserDataModel

Posted by Sean Owen <sr...@gmail.com>.
You don't need 2, no. The data model wrapper doesn't have any effect
unless dealing with that anonymous user.

On Tue, Mar 15, 2011 at 6:13 PM, Mark <st...@gmail.com> wrote:
>
> Thats correct.
>
> Ok if I use the plusOneModel as the model for my recommender is it OK to use that recommender for normal recommendations? IE... should I have 2 recommender classes?

Re: PlusAnonymousUserDataModel

Posted by Sean Owen <sr...@gmail.com>.
Looks like you're passing the raw data model to the Recommender? It
has to have the wrapper plus-one model.

On Tue, Mar 15, 2011 at 5:24 PM, Mark <st...@gmail.com> wrote:
> I keep getting the following error. Do I need a separate recommender for
> anonymous recommendations?
>
> org.apache.mahout.cf.taste.common.NoSuchUserException: -9223372036854775808
>    at
> org.apache.mahout.cf.taste.impl.model.GenericBooleanPrefDataModel.getPreferencesFromUser(GenericBooleanPrefDataModel.java:184)
>    at
> org.apache.mahout.cf.taste.impl.model.file.FileDataModel.getPreferencesFromUser(FileDataModel.java:632)
>    at
> org.apache.mahout.cf.taste.impl.recommender.GenericItemBasedRecommender.getNumPreferences(GenericItemBasedRecommender.java:246)
>    at
> org.apache.mahout.cf.taste.impl.recommender.GenericItemBasedRecommender.recommend(GenericItemBasedRecommender.java:120)
>    at
> org.apache.mahout.cf.taste.impl.recommender.AbstractRecommender.recommend(AbstractRecommender.java:64)
>    at
> com.ioffer.recommendations.Recommender.anonymousRecommend(Recommender.java:64)
>    at
> com.ioffer.recommendations.controllers.RecommendationsController.anonymousRecommend(RecommendationsController.java:57)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
>
> On 3/14/11 8:35 AM, Mark wrote:
>>
>> Also forgot to ask. Is it OK to use the same recommender for anonymous
>> users as well as logged in users or will I need a separate recommender for
>> each situation?.
>>
>> Thanks
>>
>> On 3/14/11 8:27 AM, Mark wrote:
>>>
>>> I have a some questions regarding the user of PlusAnonymousUserDataModel.
>>> As per the javadoc:
>>>
>>> /DataModel realModel = ...;
>>> DataModel plusModel = new PlusAnonymousUserDataModel(realModel);
>>>
>>> ItemSimilarity similarity = new LogLikelihoodSimilarity(realModel); //
>>> not plusModel/
>>>
>>> So I should be constructing my Similarity class using the original
>>> DataModel and not the PlusDataModel? Why is that? Also when constructing the
>>> Recommender should I be using the real DataModel or the PlusDataModel?
>>>
>>> Thanks
>

Re: PlusAnonymousUserDataModel

Posted by Mark <st...@gmail.com>.
I keep getting the following error. Do I need a separate recommender for 
anonymous recommendations?

org.apache.mahout.cf.taste.common.NoSuchUserException: -9223372036854775808
     at 
org.apache.mahout.cf.taste.impl.model.GenericBooleanPrefDataModel.getPreferencesFromUser(GenericBooleanPrefDataModel.java:184)
     at 
org.apache.mahout.cf.taste.impl.model.file.FileDataModel.getPreferencesFromUser(FileDataModel.java:632)
     at 
org.apache.mahout.cf.taste.impl.recommender.GenericItemBasedRecommender.getNumPreferences(GenericItemBasedRecommender.java:246)
     at 
org.apache.mahout.cf.taste.impl.recommender.GenericItemBasedRecommender.recommend(GenericItemBasedRecommender.java:120)
     at 
org.apache.mahout.cf.taste.impl.recommender.AbstractRecommender.recommend(AbstractRecommender.java:64)
     at 
com.ioffer.recommendations.Recommender.anonymousRecommend(Recommender.java:64)
     at 
com.ioffer.recommendations.controllers.RecommendationsController.anonymousRecommend(RecommendationsController.java:57)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


On 3/14/11 8:35 AM, Mark wrote:
> Also forgot to ask. Is it OK to use the same recommender for anonymous 
> users as well as logged in users or will I need a separate recommender 
> for each situation?.
>
> Thanks
>
> On 3/14/11 8:27 AM, Mark wrote:
>> I have a some questions regarding the user of 
>> PlusAnonymousUserDataModel. As per the javadoc:
>>
>> /DataModel realModel = ...;
>> DataModel plusModel = new PlusAnonymousUserDataModel(realModel);
>>
>> ItemSimilarity similarity = new LogLikelihoodSimilarity(realModel); 
>> // not plusModel/
>>
>> So I should be constructing my Similarity class using the original 
>> DataModel and not the PlusDataModel? Why is that? Also when 
>> constructing the Recommender should I be using the real DataModel or 
>> the PlusDataModel?
>>
>> Thanks

Re: PlusAnonymousUserDataModel

Posted by Mark <st...@gmail.com>.
Also forgot to ask. Is it OK to use the same recommender for anonymous 
users as well as logged in users or will I need a separate recommender 
for each situation?.

Thanks

On 3/14/11 8:27 AM, Mark wrote:
> I have a some questions regarding the user of 
> PlusAnonymousUserDataModel. As per the javadoc:
>
> /DataModel realModel = ...;
> DataModel plusModel = new PlusAnonymousUserDataModel(realModel);
>
> ItemSimilarity similarity = new LogLikelihoodSimilarity(realModel); // 
> not plusModel/
>
> So I should be constructing my Similarity class using the original 
> DataModel and not the PlusDataModel? Why is that? Also when 
> constructing the Recommender should I be using the real DataModel or 
> the PlusDataModel?
>
> Thanks