Professional Documents
Culture Documents
Mahout-Itembased recommender
Open Eclipse.
Open File NewJavaProject.
Give Project name as ItemRecommender.
Now create a Library folder to store our jar files
and library files, and create a new folder to add our
Data.
All the Libraries we need is Apache Mahout
Libraries -https://mahout.apache.org/general/downloads.html
Download Latest --0.9/-- mahout-distribution-0.9.zip
-download this Zipfile.
From http://grouplens.org/datasets/movielens/--ml100k.zip download this Zipfile.
From http://slf4j.org/download.html -- slf4j1.7.6.zip download this Zipfile.
From https://code.google.com/p/guava-libraries/ -- guava16.0.1.jar download this Zipfile.
From http://commons.apache.org/proper/commonsmath/download_math.cgi -- commons-math3-3.2-bin.zip
Outputs:
Part B:
1.Using PearsonCorrelationSimilarity Metric:
For PearsonCorrelationSimilarity Metric use
ItemSimilarity sim = new PearsonCorrelationSimilarity(dm);
Outputs:
Pearson
Correlation Similarity
Metric
Euclidian
Distance
Similarity Metric
Tanimoto
Coefficient
Similarity Metric
LogLikelihoodSimila
rity Metric
1,757,1.0
1,341,1.0
2,75,1.0
2,74,1.0
3,344,1.0
3,115,1.0
4,643,1.0
4,360,1.0
5,34,1.0
5,6,1.0
1,757,1.0
1,711,1.0
2,359,1.0
2,308,1.0
3,377,1.0
3,344,1.0
4,814,1.0
4,711,1.0
5,533,1.0
5,314,1.0
1,50,0.5825688
1,121,0.5537919
2,233,0.53614455
2,231,0.4918033
3,17,0.2638889
3,123,0.2576687
4,385,0.46830985
4,202,0.46407187
5,218,0.35978836
5,672,0.31304348
1,117,0.9953521
1,151,0.9953065
2,403,0.9964998
2,233,0.9964557
3,405,0.99037176
3,235,0.9893157
4,56,0.99627966
4,174,0.99601305
5,218,0.99432045
5,98,0.9922024