mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zia mel <ziad.kame...@gmail.com>
Subject Re: Boolean preferences and evaluation
Date Tue, 22 Jan 2013 16:04:05 GMT
Thanks Sean.

- When I used GenericUserBasedRecommender in code 2 I got 0 , but when
using GenericBooleanPrefUserBasedRecommender both MAE and RMSE in case
2 gave me scores, so only RMSE is not useful or also MAE ?

- If I want to compare between recommenders that use preferences and
those that don't use , does using code 3 and 4 below with
GenericRecommenderIRStatsEvaluator makes sense? Since using code 2
with GenericBooleanPrefUserBasedRecommender creates different
recommender that uses weights.

//---  Code 3 -----

     DataModel model = new FileDataModel(new File("ua.base"));

 RecommenderIRStatsEvaluator evaluator = new
GenericRecommenderIRStatsEvaluator();
    RecommenderBuilder recommenderBuilder = new RecommenderBuilder() {

      public Recommender buildRecommender(DataModel model) throws
TasteException {
         UserSimilarity similarity = new PearsonCorrelationSimilarity(model);
         UserNeighborhood neighborhood = new
NearestNUserNeighborhood(k, similarity, model);
           return new GenericUserBasedRecommender(model, neighborhood,
similarity);
      }};

//--- Code 4 ---

  DataModel model = new GenericBooleanPrefDataModel(
        GenericBooleanPrefDataModel.toDataMap(
          new FileDataModel(new File("ua.base"))));

    RecommenderIRStatsEvaluator evaluator = new
GenericRecommenderIRStatsEvaluator();
    RecommenderBuilder recommenderBuilder = new RecommenderBuilder() {

      public Recommender buildRecommender(DataModel model) throws
TasteException {
         UserSimilarity similarity = new LogLikelihoodSimilarity(model);
         UserNeighborhood neighborhood = new
NearestNUserNeighborhood(k, similarity, model);
           return new GenericUserBasedRecommender(model, neighborhood,
similarity);
      }};


On Tue, Jan 22, 2013 at 1:58 AM, Sean Owen <srowen@gmail.com> wrote:
> No it's really #2, since the first still has data that is not
> true/false. I am not sure what eval you are running, but an RMSE test
> wouldn't be useful in case #2. It would always be 0 since there is
> only one value in the universe: 1. No value can ever be different from
> the right value.
>
> On Tue, Jan 22, 2013 at 4:34 AM, Zia mel <ziad.kamel25@gmail.com> wrote:
>> Hi !
>>
>> Can we say that both code 1 and 2 below are using boolean recommender
>> since they both use LogLikelihoodSimilarity? Which code is used by
>> default when no preferences are available ? When using
>> GenericUserBasedRecommender in code 1 it gave a score during
>> evaluation , but when using it in code 2 it gave 0 , is the score
>> given by code 1 correct since in MAI book page 23 said "In the case of
>> Boolean preference data, only a precision-recall test is available
>> anyway".
>>
>> //-- Code 1 --
>>   DataModel model = new GroupLensDataModel(new File("ratings.dat"));
>>   RecommenderBuilder recommenderBuilder = new RecommenderBuilder() {
>>       public Recommender buildRecommender(DataModel model) throws
>> TasteException {
>>           UserSimilarity similarity = new LogLikelihoodSimilarity(model);
>>           UserNeighborhood neighborhood = new
>> NearestNUserNeighborhood(2, similarity, model);
>>           return new GenericUserBasedRecommender(model, neighborhood,
>> similarity);
>>       }};
>>
>> //--- Code 2 ---
>> DataModel model = new GenericBooleanPrefDataModel(
>>         GenericBooleanPrefDataModel.toDataMap(
>>         new FileDataModel(new File("ua.base"))));
>>
>>     RecommenderBuilder recommenderBuilder = new RecommenderBuilder() {
>>       public Recommender buildRecommender(DataModel model) throws
>> TasteException {
>>         UserSimilarity similarity = new LogLikelihoodSimilarity(model);
>>         UserNeighborhood neighborhood = new
>> NearestNUserNeighborhood(2, similarity, model);
>>        return new GenericBooleanPrefUserBasedRecommender (model,
>> neighborhood, similarity);
>>       }};
>>
>> Many Thanks !

Mime
View raw message