From mahout-user-return-1637-apmail-lucene-mahout-user-archive=lucene.apache.org@lucene.apache.org Wed Nov 04 18:28:50 2009 Return-Path: Delivered-To: apmail-lucene-mahout-user-archive@minotaur.apache.org Received: (qmail 55466 invoked from network); 4 Nov 2009 18:25:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Nov 2009 18:25:58 -0000 Received: (qmail 98292 invoked by uid 500); 4 Nov 2009 18:25:58 -0000 Delivered-To: apmail-lucene-mahout-user-archive@lucene.apache.org Received: (qmail 98267 invoked by uid 500); 4 Nov 2009 18:25:58 -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 98257 invoked by uid 99); 4 Nov 2009 18:25:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 18:25:58 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of srowen@gmail.com designates 209.85.219.226 as permitted sender) Received: from [209.85.219.226] (HELO mail-ew0-f226.google.com) (209.85.219.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 18:25:50 +0000 Received: by ewy26 with SMTP id 26so7569115ewy.5 for ; Wed, 04 Nov 2009 10:25:30 -0800 (PST) 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; bh=Yl997CIuTAzdqbEOkovi/FTvAig6V1MHAe8uuZi/vTs=; b=GIohWKWqClW5ua8JhDSM5tJsqRE6E+wjulP96/nkLmHTSvDrScSItEKvHusPNvo8VP OMJKZqLqv1n53lmULdQGVpX8nQt/VWkUTkO/CjU/OQdHCeLQFT3rKZ1aRNUl1p68YVHq 3nRYaff/8hGY7hOsDWy0HN9fK7/APsvx7Iumo= 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; b=rbcrCp5AokcBFM6rCAZj6iiQR/ao3zhhha/ocoHkBYw6e3tEykCLTxpGQ4jnpp/JPd zy3yn0+Df9w5w354srUIwoAOOalucIvXs4JrQgDbu8v6LCpKZuQ9PwYFF+h8M2ohCpCr 02PXXlODeyJ0hfSPr5Puk52S9mb2qq5XeFGCI= MIME-Version: 1.0 Received: by 10.216.85.134 with SMTP id u6mr577326wee.213.1257359129623; Wed, 04 Nov 2009 10:25:29 -0800 (PST) In-Reply-To: <3BFDAF52-2683-4A8A-A0FC-10AD8C419598@pintley.com> References: <938CD96C-4C7B-48BD-A967-82E46941E108@googlemail.com> <3BFDAF52-2683-4A8A-A0FC-10AD8C419598@pintley.com> Date: Wed, 4 Nov 2009 18:25:29 +0000 Message-ID: Subject: Re: Recommender with filtering From: Sean Owen To: mahout-user@lucene.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org The easiest way to do this by far is with a Rescorer object, passed to the recommend() method. The implementation should simply look at the item ID it's given, and return NaN if it's *not* from the given category, otherwise return the original score. It'll make sense if you look at the interface but post back with questions here. On Wed, Nov 4, 2009 at 5:42 PM, Shannon Hicks wrote: > In my recommender, my items are grouped into categories. I'd like to end up > getting recommendations filtered by a specific category. > > Are there any examples or suggestions out there on how we might go about > this? I'm thinking the way to go would be to do a JOIN query somewhere in > the GenericJDBCDataModel when needed. > > Shan >