Return-Path: Delivered-To: apmail-mahout-user-archive@www.apache.org Received: (qmail 28211 invoked from network); 20 Nov 2010 15:07:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Nov 2010 15:07:06 -0000 Received: (qmail 91914 invoked by uid 500); 20 Nov 2010 15:07:37 -0000 Delivered-To: apmail-mahout-user-archive@mahout.apache.org Received: (qmail 91794 invoked by uid 500); 20 Nov 2010 15:07:36 -0000 Mailing-List: contact user-help@mahout.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@mahout.apache.org Delivered-To: mailing list user@mahout.apache.org Received: (qmail 91785 invoked by uid 99); 20 Nov 2010 15:07:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Nov 2010 15:07:35 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of stefanobellasio@gmail.com designates 74.125.82.50 as permitted sender) Received: from [74.125.82.50] (HELO mail-ww0-f50.google.com) (74.125.82.50) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Nov 2010 15:07:26 +0000 Received: by wwd20 with SMTP id 20so5571121wwd.7 for ; Sat, 20 Nov 2010 07:07:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:mime-version :content-type:subject:date:in-reply-to:to:references:message-id :x-mailer; bh=XpH0KpMtGGLw3Ne1Rmb7alvkRdZ1pKrpO6Rx/KHGYAk=; b=EjR02jP1T7Klsu2ETjEFifGlagiyqFE2HK76lkzjz2q37ElYB421Q7zL5Qz8uNUdUV eH06GW779iZ1XfRIKGL6DSeUtSJHzHVzMzzMC9Yup5888zKtkx/IfE5mH4GM91JAFWk/ lBDgX6E4XuxE4H4wAPlAUpezanyPrucxsfrG4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; b=xykJUWwDoUfuGDQtn+xTa5bh+oMHI0C+x995Rf7vtotnnJ2IbkopF9NGwSxlVDEDo5 jLpxbvpWm0y1BK/ZmBJq/jMW7JHCV5qTeSiUdUsDen2JIrm+RVsYWlmnl99XGGmUVKfT 40J6YqmzDiGDYpbKbYQ/wCUvPsdH3sx9QcQmw= Received: by 10.216.238.130 with SMTP id a2mr1015382wer.77.1290265624894; Sat, 20 Nov 2010 07:07:04 -0800 (PST) Received: from [192.168.1.4] (ppp-103-195.15-151.iol.it [151.15.195.103]) by mx.google.com with ESMTPS id h53sm1350088wee.21.2010.11.20.07.07.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 20 Nov 2010 07:07:04 -0800 (PST) From: Stefano Bellasio Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/alternative; boundary=Apple-Mail-2-573270077 Subject: Re: Grouplens dataset Recommenderjob with Hadoop Date: Sat, 20 Nov 2010 16:06:38 +0100 In-Reply-To: To: user@mahout.apache.org References: <027A8AA6-5CE5-4223-81B8-DEC4E0FB719A@gmail.com> <6BD632C4-BF86-4B06-8765-1A8F0788EF58@gmail.com> <66D292F4-138B-448F-BF9D-3058412D531B@gmail.com> <81BE03B3-1D47-43C8-A014-D412688AD33B@gmail.com> Message-Id: <5E0E39E4-1662-45C2-BECF-C3EA7653920C@gmail.com> X-Mailer: Apple Mail (2.1082) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-2-573270077 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Something like this? And then i have to package it and use instead of = Mahout-core..job right? Thanks again public class ItemBased implements Recommender { //private final Recommender delegate; private DataModel model;=20 =09 public ItemBased(DataModel model) throws TasteException, = IOException { =09 ItemSimilarity similarity =3D new = PearsonCorrelationSimilarity(model);=09 =09 ItemBasedRecommender recommender =3D new = GenericItemBasedRecommender(model, similarity); LoadEvaluator.runLoad(recommender); List recommendations =3D = recommender.recommend(1,1); =09 =09 for (RecommendedItem recommendation : recommendations){ System.out.println(recommendation); } } @Override public float estimatePreference(long userID, long = itemID) throws TasteException { // TODO Auto-generated method stub return 0; } @Override public DataModel getDataModel() { // TODO Auto-generated method stub return null; } @Override public List recommend(long userID, int = howMany) throws TasteException { // TODO Auto-generated method stub return null; } @Override public List recommend(long userID, int = howMany, IDRescorer rescorer) throws = TasteException { // TODO Auto-generated method stub return null; } @Override public void removePreference(long userID, long itemID) throws TasteException { // TODO Auto-generated method stub =09 } @Override public void setPreference(long userID, long itemID, = float value) throws TasteException { // TODO Auto-generated method stub =09 } @Override public void refresh(Collection = alreadyRefreshed) { // TODO Auto-generated method stub =09 } Il giorno 20/nov/2010, alle ore 12.39, Sean Owen ha scritto: > Look at Listing 5.5. This is the kind of wrapper you need. You can = skip the > no-arg constructor actually and just write the one that takes a = DataModel, > if I recall correctly. Just delegate the rest of the methods. Inside = the > constructor, build whatever recommender you want. >=20 > On Sat, Nov 20, 2010 at 11:30 AM, Stefano Bellasio < > stefanobellasio@gmail.com> wrote: >=20 >> So for example i need to follow the same steps of Wikipedia example = in >> Mahout in Action? then package it and use with this? Please i need = some info >> just about the correct steps :) Thanks >>=20 >>=20 --Apple-Mail-2-573270077--