Oh, yes, that's your problem. You need to use the DataModel passed to
the buildRecommender method, not build your own!

Otherwise you are creating a DataModel with all of your data, which
contains all of the "answers" -- it already knows the correct value of
all test data points. The point is that the framework constructs a new
DataModel without the test data points, to see how well the
recommender guesses the value of those data points.

On Sat, Nov 21, 2009 at 1:35 PM, jamborta <[email protected]> wrote:
>
> it works fine if I use this code:
>
>    public Recommender buildRecommender(DataModel dataModel) throws
> TasteException {
>
>
>        UserSimilarity userSimilarity = new
> PearsonCorrelationSimilarity(dataModel);
>        UserNeighborhood neighborhood =
>                new NearestNUserNeighborhood(10, userSimilarity, dataModel);
>        Recommender recommender =
>                new GenericUserBasedRecommender(dataModel, neighborhood,
> userSimilarity);
>        return recommender;
>
>    }
>
> but if I create a dataModel objects here that it doesn't work. I think the
> reason is that I have two dataModel objects created and the one that is
> passed to the evalautor is not separated.
>
>
>
>
>
>
>
> I get a result of 1.04.  Are you sure your data file is right? Should be
> using ua.base from that data set.
>
>
> --
> View this message in context: 
> http://old.nabble.com/evaluating-recommender-systems-tp26421408p26456606.html
> Sent from the Mahout User List mailing list archive at Nabble.com.
>
>

Reply via email to