Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

How can creating a recommender by spark-itemsimilarity

$
0
0
Hi, All
I saw spark-itemsimilarity doc at http://mahout.apache.org/users/recommender/intro-cooccurrence-spark.html, but I don’t understand how can creating a recommender by spark-itemsimilarity? I don’t understand "3 Creating a Recommender" chapter.
For input of the form:
u1,purchase,iphone
u1,purchase,ipad
u2,purchase,nexus
u2,purchase,galaxy
u3,purchase,surface
u4,purchase,iphone
u4,purchase,galaxy
u1,view,iphone
u1,view,ipad
u1,view,nexus
u1,view,galaxy
u2,view,iphone
u2,view,ipad
u2,view,nexus
u2,view,galaxy
u3,view,surface
u3,view,nexus
u4,view,iphone
u4,view,ipad
u4,view,galaxy
output
out-path
|-- indicator-matrix - TDF part files
\-- cross-indicator-matrix - TDF part-files
The indicator matrix will contain the lines:
galaxy\tnexus:1.7260924347106847
ipad\tiphone:1.7260924347106847
nexus\tgalaxy:1.7260924347106847
iphone\tipad:1.7260924347106847
surface
The cross-indicator matrix will contain:
iphone\tnexus:1.7260924347106847 iphone:1.7260924347106847 ipad:1.7260924347106847 galaxy:1.7260924347106847
ipad\tnexus:0.6795961471815897 iphone:0.6795961471815897 ipad:0.6795961471815897 galaxy:0.6795961471815897
nexus\tnexus:0.6795961471815897 iphone:0.6795961471815897 ipad:0.6795961471815897 galaxy:0.6795961471815897
galaxy\tnexus:1.7260924347106847 iphone:1.7260924347106847 ipad:1.7260924347106847 galaxy:1.7260924347106847
surface\tsurface:4.498681156950466 nexus:0.6795961471815897
————----
Now,u4 view nexus, how to recommend for u4 by the above of output?

Thanks.

Viewing all articles
Browse latest Browse all 5648

Trending Articles