2013-06-27 44 views
1

我正在使用Ubuntu12.04,Hadoop-1.0.4,Mahout-0.7在Hadoop集羣上運行作業推薦算法,當我以這種格式輸入文件時,地圖縮減運行正常但沒有給出任何結果(空白)什麼是推薦引擎的文件輸入格式?

tataRecommend100.txt(用戶ID - 的productID - 偏好)

14218954 54518 4 
14218954 617691 2 
14218954 616488 2 
14218954 614975 2 
14218954 605662 1 
14218954 619979 1 
14218954 14183 3 
14218954 611309 5 
14218954 615242 3 
14218954 13138 1 
14232708 54518 1 
14232708 617691 3 
14232708 616488 1 
14232708 614975 5 
14232708 605662 4 

命令: - bin/hadoop jar /home/hadoop/apacheC/mahout-distribution-0.7/mahout-core-0.7-job.jar
org.apache.mahout.cf.taste.hadoop.item.RecommenderJob -s SIMILARITY_COOCCURRENCE --input /tataDocomo/recommend/tataRecommend100.txt --output /tataDocomo/recommend/tataRecommendOutput

+0

你確定你的代碼? – Tariq

+0

@ Tariq,是的,我敢肯定,當我使用GroupLensdata(http://www.grouplens.org/system/files/ml-100k.zip),u.data文件時,代碼工作正常。我也在這裏使用了同樣的結構,但是不工作 –

回答

0

你的數據簡直是太稀疏/小提出建議。嘗試使用非玩具數據集。

+0

由於空間限制,我只顯示20行,但我運行在10000評級(行)具有不同的值。 –

0

難道你沒有給它一個你想要推薦的用戶ID嗎?當我第一次嘗試時,這發生在我身上。沒有輸出。您將其放入您爲--userFile傳入的文件中。