Return-Path: Delivered-To: apmail-lucene-mahout-user-archive@minotaur.apache.org Received: (qmail 50834 invoked from network); 27 Aug 2009 09:59:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Aug 2009 09:59:06 -0000 Received: (qmail 68455 invoked by uid 500); 27 Aug 2009 09:59:06 -0000 Delivered-To: apmail-lucene-mahout-user-archive@lucene.apache.org Received: (qmail 68404 invoked by uid 500); 27 Aug 2009 09:59:06 -0000 Mailing-List: contact mahout-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mahout-user@lucene.apache.org Delivered-To: mailing list mahout-user@lucene.apache.org Received: (qmail 68393 invoked by uid 99); 27 Aug 2009 09:59:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2009 09:59:06 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of srowen@gmail.com designates 209.85.219.222 as permitted sender) Received: from [209.85.219.222] (HELO mail-ew0-f222.google.com) (209.85.219.222) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2009 09:58:58 +0000 Received: by ewy22 with SMTP id 22so1061278ewy.28 for ; Thu, 27 Aug 2009 02:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Zg8rM5g01pgRBPajezZqtAmYa8eTcWLUsIqY5DGy1YY=; b=jE+gQMW6rfBUDKXdRN74wN607U0+Jn4ew6LDSZldJOXGERwjEEG+TqSf53hCmrZrEm 2TboQwA4v8EPmcpgdeyPD4Q7wrdBMxittzhE50a8BeWomeQToFJMK1wFCE84l4SyYc3d LV/Bh9z6usH2wmTJxKB7LKz/j1QTqhChdWyRQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=vL8V9MoruUzQajYCFtW1AEwlVpzuFc/Z6fJgv0Z1RwT0WtDq9h07TorcLK2YQDGyJA oBOuWUPbFMVSOS43UN/imj2YunNSSV+LY02Xa/+62jWw0AUBxdaH7oW6aTbfDISXVfX5 1brYVPJzmcXrqTyDejBTGpvre3PACfXCuUE8w= MIME-Version: 1.0 Received: by 10.216.22.78 with SMTP id s56mr1748483wes.100.1251367116420; Thu, 27 Aug 2009 02:58:36 -0700 (PDT) In-Reply-To: <001601ca26fa$ae69a8c0$0b3cfa40$@unisa.it> References: <000a01ca2654$e9d7c1e0$bd8745a0$@unisa.it> <000801ca265c$51a44fd0$f4ecef70$@unisa.it> <000001ca26ed$f2c175f0$d84461d0$@unisa.it> <001201ca26f8$264c25f0$72e471d0$@unisa.it> <001601ca26fa$ae69a8c0$0b3cfa40$@unisa.it> Date: Thu, 27 Aug 2009 10:58:36 +0100 Message-ID: Subject: Re: R: R: R: R: Problems with evaluator. From: Sean Owen To: mahout-user@lucene.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Right, in that case you can pass any threshold less than 1. This will cause the framework to pick the first "at" items it encounters as relevant. Since there is no way of differentiating the items, this is as good as anything. So if you are evaluating precision at 3, it will pick some 3 items as relevant. Sounds like you already tried passing Double.NEGATIVE_INFINITY, which is fine. If it is still not giving results, my other guesses still stand -- low evaluation percentage? too few preferences per user? I think you need to go in with a debugger; it's hard to guess more from here. I can tell you for what it's worth that I am using the same evaluator (in the main Java code of course) to evaluate results in a similar data set and it appears to work fine for me. There could be some issue in the port, or perhaps there was a bug fix since the port happened? I don't remember a bug fix here in a while but could be missing something. On Thu, Aug 27, 2009 at 10:42 AM, Claudia Grieco wro= te: > But since I'm using boolean preference data, all the preferences are rele= vant (score 1) so they are all erased from the training data: > > for (Preference pref : prefs) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (pref.getValue() >=3D theRelevanceTh= reshold) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0relevantItems.add(pref.getItem()= ); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > > -----Messaggio originale----- > Da: Sean Owen [mailto:srowen@gmail.com] > Inviato: gioved=C3=AC 27 agosto 2009 11.29 > A: mahout-user@lucene.apache.org > Oggetto: Re: R: R: R: Problems with evaluator. > > Yes, that is correct. The framework splits the user's preferences into > "relevant" and "not relevant" items. It then takes away the relevant > items, and leaves the non-relevant items in the training data. Then, > it sees how many of those relevant items are recommended back to the > user, to compute precision and recall. > > On Thu, Aug 27, 2009 at 10:24 AM, Claudia Grieco w= rote: >> Notice this part: >> for (Preference pref : prefs2) { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!relevantItems.contains(pref.getItem())) = { >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0trainingPrefs.add(pref); >> =C2=A0 =C2=A0 =C2=A0 =C2=A0}} >> It adds a preference only if it's NOT in the relevant items > >