thanks, i'm using this one with the standard movielens (100k) dataset.
public Recommender buildRecommender(DataModel dataModel) throws
TasteException {
DataModel model = null;
try {
model = new FileDataModel(new File("./data/all_data.data"));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
UserSimilarity userSimilarity = new
PearsonCorrelationSimilarity(model);
UserNeighborhood neighborhood =
new NearestNUserNeighborhood(10, userSimilarity, model);
Recommender recommender =
new GenericUserBasedRecommender(dataModel, neighborhood,
userSimilarity);
return recommender;
}
srowen wrote:
>
> 0 is very good! But I agree, it is probably an error.
>
> I see you call evaluate() twice. This is not necessary. Call it once,
> and save the result, then print it. But this is not the issue.
>
> What is in the ItemBasedBuilder class? what is your data like? Maybe
> if I can see this I can suggest why you get this result.
>
> On Thu, Nov 19, 2009 at 5:31 PM, jamborta <[email protected]> wrote:
>>
>> hi.
>>
>> i'm not sure if this is a bug or I do somthing wrong, but when I try to
>> evaluate a system it returns 0 as a result. I'm using this piece of code:
>>
>> DataModel model = new FileDataModel(new
>> File("./data/all_data.data"));
>> RecommenderBuilder build = new ItemBasedBuilder();
>> AverageAbsoluteDifferenceRecommenderEvaluator evaluate = new
>> AverageAbsoluteDifferenceRecommenderEvaluator();
>> DataModelBuilder model2 = null;
>> evaluate.evaluate(build, model2, model,0.8,0.2 );
>> System.out.println(evaluate.evaluate(build, model2,
>> model,0.8,0.2 ));
>>
>> thanks a lot.
>> --
>> View this message in context:
>> http://old.nabble.com/evaluating-recommender-systems-tp26421408p26421408.html
>> Sent from the Mahout User List mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context:
http://old.nabble.com/evaluating-recommender-systems-tp26421408p26438752.html
Sent from the Mahout User List mailing list archive at Nabble.com.