mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chepoo <swallow_p...@163.com>
Subject Re: How to recommend based on spark-itemsimilarity output?
Date Tue, 14 Oct 2014 05:52:18 GMT
Hi Pat,

	Let me explain my intention. When users view a item(for instance: http://www.amazon.com/Mahout-Action-Sean-Owen/dp/1935182684/ref=lh_ni_t?ie=UTF8&psc=1&smid=ATVPDKIKX0DER
), recommend the following:



I know I will consider many factors and many kinds of recommendations, such as based on the
content、context、tag etc, but now only consider using spark-itemsimilarity result to recommend
here, it that ok? If that ok, Look I prepare new dataset, some places described not clear
at before.

	itemId	|	purchase	|	view
----------------------------------------------------------------------------------------
	11	|	12 13 14 15	|	12 13 14 15 16
	12	|	13 18 19	|	12 13 18 17 19
	13	|	20 21 22	|	11 10 12 20 21 22
	15	|			|	20 21
	16	|	15 16		|	14 15 16 10 18
----------------------------------------------------------------------------------------
	when a user viewed item 14, and now viewing 15, "Customers who viewed this item also viewed"
recommendation for him/her, there should only be recommended based on 15:
	Solr Query: 
		q=view:15&fl=view, the result are: 12 13 14 15 16 and 14 15 16 10 18;
		q=view:15&fl=itemId, the result are: 11 and 16.
	Which one is correct? And returns the result of the order is important? Such as 11 16 or
16 11.



When I add it to cart to recommend the following:



This is based on the shopping cart items to recommend. When a user viewed history is 14,15,16,
and added 15,16 to shopping cart, recommendation for him/her:
	Solr Query: 
		q=(purchase:15 OR purchase:16)&fl=purchase, and result are : 12 13 14 15 and 15 16;
		q=(purchase:15 OR purchase:16)&fl=itemId, and result are : 11 and 16
	Which one is correct?


Is that correctly useage? Can you give your suggestion? Our recommendation is still in the
initial stage, and will gradually strengthen and perfect.

Thanks,
chepoo

On Oct 13, 2014, at 23:48, Pat Ferrel <pat@occamsmachete.com> wrote:

> A: yes
>   for the user mentioned:
>      query: field=view;q=“13 14” 
>   this will return 1, 2, 5
>   These are  purchase recommendations, “other people like you also purchased these”
> 
> B: 
>   query: 
>      field=purchase;q=“15”
>      field=view;q=“14, 15”
>   this returns 1, 5 so the recommendations are 1 and 5, which have item ids of 11 and
16. You do *not* look up the indicators for 1 and 5, you recommend the items that 1 and 5
represent.
> 
> The way you have it set up the result of the query will be your DB key that you call
Fields/indexNo. The itemid is a foreign or external key that you have you DB index also so
you can look up the items by that if you wish.
> 
> 
> On Oct 13, 2014, at 6:30 AM, Pat Ferrel <pat@occamsmachete.com> wrote:
> 
> The query is a two field query:
> 
> field purchase; q=“user’s history of purchases”
> field view: q=“user’s history of views”
> 
> This will return an ordered list of items “other people with similar taste also liked
these”. Either field query can be empty.
> 
> For “other items like this” when you are viewing an item use that items interactions
history in the query or just lookup the similar items in the indicator matrices.
> 
> Remember what you are calling “views" are really "purchase-view" cross cooccurrences
so they recommend _purchase_ not view. Your #B below is recommending purchases.
> 
> If you want to recommend views create a view-only indicator matrix. But this is probably
not what you want to do. You want to “predict” what your user may want to purchase, right?
> 
> 
> On Oct 13, 2014, at 3:35 AM, pol <swallow_pulm@163.com> wrote:
> 
> Hi all/Pat,
> 
> 	I have created index by Solr, user two actions: purchase and view, index looks like
this:
> 
> Fields/indexNo	|	itemId	|	purchase	|	view
> ----------------------------------------------------------------------------------------

> 1		|	11	|	12 13 14 15	|	12 13 14 15 16
> 2		|	12	|	13 18 19	|	12 13 18 17 19
> 3		|	13	|	20 21 22	|	11 10 12 20 21 22
> 4		|	15	|			|	20 21
> 5		|	16	|	15 16		|	14 15 16 10 18
> ----------------------------------------------------------------------------------------
> 
> 	A. If a user’s view history : 13 and 14, now recommended for him - "other people also
viewed these items":
> 
> 		Solr Query: q:view=13 or q:view=14, will be return the line 1,2,5 index data, use "view"
field together is OK? 
> 
> 
> 	B. If a user’s view history : 14 and 15, and purchase history : 15, now recommended
for him - "other people also purchased these items":
> 
> 		Solr Query: (q:view=14 or q:view=15) and (q:purchase=15), will be return the line 1,5
index data, use "purchase" field together is OK? recommendation are : 12,13,14,15,15,16.
> 
> 
> 	The above is that right? If it’s right, the "itemId" field is never used.
> 	And the "indexNo" number order is important? there is no use.
> 
> 
> 
> Thanks,
> chepoo
> 
> 


Mime
View raw message