You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Naveen <ta...@gmail.com> on 2013/07/13 04:55:04 UTC

How to use the below dataset in Mahout (cf)

Hi All,

I want to build a recommender engine using cf of Mahout with a dataset as below:
<user,car1-rating,car2-rating, ............carn-rating> where user is string value and ratings are numeric.

Mahout seems to support <userid,itemid,rating> with numerical values directly, but is there a way to support a dataset like above by building a custom FileDataModel? 
Or do we need to convert the dataset to the Mahout supported dataset format?

I am new to Mahout.
Please provide me an example where possible.

Thanks in advance,
Naveen

Re: How to use the below dataset in Mahout (cf)

Posted by Sebastian Schelter <ss...@apache.org>.
Hi Naveen,

you can use an org.apache.mahout.cf.taste.model.IDMigrator to map from
string ids to long ids and back.

-sebastian


On 13.07.2013 04:55, Naveen wrote:
> Hi All,
> 
> I want to build a recommender engine using cf of Mahout with a dataset as below:
> <user,car1-rating,car2-rating, ............carn-rating> where user is string value and ratings are numeric.
> 
> Mahout seems to support <userid,itemid,rating> with numerical values directly, but is there a way to support a dataset like above by building a custom FileDataModel? 
> Or do we need to convert the dataset to the Mahout supported dataset format?
> 
> I am new to Mahout.
> Please provide me an example where possible.
> 
> Thanks in advance,
> Naveen
> 


Re: How to use the below dataset in Mahout (cf)

Posted by Andrew Musselman <an...@gmail.com>.
You'll have to do the same type of logic either way; it's straightforward to convert the format you have into the market matrix type of input you are looking for.

Here is a decent starting point with some background on the rationale for the three-column version:  
http://math.nist.gov/MatrixMarket/formats.html

Hope this helps!

Best
Andrew

On Jul 12, 2013, at 8:55 PM, Naveen <ta...@gmail.com> wrote:

> Hi All,
> 
> I want to build a recommender engine using cf of Mahout with a dataset as below:
> <user,car1-rating,car2-rating, ............carn-rating> where user is string value and ratings are numeric.
> 
> Mahout seems to support <userid,itemid,rating> with numerical values directly, but is there a way to support a dataset like above by building a custom FileDataModel? 
> Or do we need to convert the dataset to the Mahout supported dataset format?
> 
> I am new to Mahout.
> Please provide me an example where possible.
> 
> Thanks in advance,
> Naveen