You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Pat Ferrel <pa...@gmail.com> on 2013/04/02 23:43:25 UTC

cross recommender

Taking an idea from Ted, I'm working on a cross recommender starting from mahout's m/r implementation of an item-based recommender. We have purchases and views for items by user. It is straightforward to create a recommender on purchases but using views as a predictor of purchases does not work so well--giving us lower precision scores. This is, no doubt, because the events have a lot of noise, views that do not lead to purchases.

To help solve this Ted suggests we think of a recommender in two parts:

[B'B]h_p = r_p  <== standard item-based recommender using purchases
[B'A]h_v = r_v  <== cross-recommender using views and purchases
r = r_p + r_v   <== linear combination of the two parts is the full recommendation vector

These both make recommendations for purchases but method 2 makes cross recommendations based on views. [B'A] is the co-occurrence matrix of views with purchases. 

From RecommenderJob the 'similarity matrix' is created by:

  //calculate the co-occurrence matrix
      ToolRunner.run(getConf(), new RowSimilarityJob(), new String[]{
          "--input", new Path(prepPath, PreparePreferenceMatrixJob.RATING_MATRIX).toString(),
          "--output", similarityMatrixPath.toString(),
          "--similarityClassname", similarityClassname,
      …

What is the role of RowSimilarityJob here and how does it lead to a co-occurrence matrix? I understand that in the general recommender the co-occurrence matrix is symmetric so columns = rows. Is the co-occurrence matrix actually calculated anywhere in the standard recommender?

The output of PreparePreferenceMatrixJob is a DistributedRowMatrix. As a first cut it seems I can do the cross recommender part of the work by:

  //calculate the 'cross' co-occurrence matrix
      B = PreparePreferenceMatrixJob using user purchase prefs
      A = PreparePreferenceMatrixJob using user view prefs
      // note that users and items must be the same for A and B, their ids must map to the same things
      B' = TransposeJob on B
      [B'A] = MatrixMultJob on B', A
      [B'A]h_v by using the partial multiply process in the standard Recommender 
      extract the needed recs

Questions:
 *  I need to get item similarities perhaps even more importantly than user history based recs. I use the [B'A] columns for this, right? Shouldn't I run RowSimilarityJob on [B'A]'?
 *  There are assumptions in some code that the co-occurrence matrix is symmetric and so rows = columns. This is not true of the 'cross' co-occurrence matrix. Are there places I need to account for this?

Re: cross recommender

Posted by Ted Dunning <te...@gmail.com>.
On Apr 4, 2013, at 5:17 PM, Pat Ferrel wrote:

> One issue with the method below is that the two source matrices would not have values for all users or items (rows or columns). I do know the entire user and item id space from a previous step so I know the # of rows including blank ones and # of columns even though some are empty. Put another way the Actual matrix (with empty rows or columns) may be larger than the number of rows in the DistributedRowMatrix or unique item ids. However all ids in one matrix will match the ids of the other matrix. 

As I mentioned in the other response I sent, only the user id's need to match.

Any item whose column in B is all zero cannot be recommended since we have never seen it.  The math won't change.  

Any item whose column in A is all zero cannot become an indicator.  That probably doesn't matter either since an item we have not yet seen is probably rare and in any case, we know nothing about it.

Any zero row of either A or B will case that user's behavior to be ignored for the purposes of cross recommendation.  That is, again, as it should be since any user who has not participated in both behaviors cannot provide information about the linkage.

> 
> AFAICT this should be OK for the TransposeJob and MatrixMultJob but I haven't tested it. I will need to pass in the size of the matrices as the size of the user and item space, Correct?

Yes.


Re: cross recommender

Posted by Pat Ferrel <pa...@gmail.com>.
One issue with the method below is that the two source matrices would not have values for all users or items (rows or columns). I do know the entire user and item id space from a previous step so I know the # of rows including blank ones and # of columns even though some are empty. Put another way the Actual matrix (with empty rows or columns) may be larger than the number of rows in the DistributedRowMatrix or unique item ids. However all ids in one matrix will match the ids of the other matrix. 

AFAICT this should be OK for the TransposeJob and MatrixMultJob but I haven't tested it. I will need to pass in the size of the matrices as the size of the user and item space, Correct?


On Apr 3, 2013, at 9:15 AM, Pat Ferrel <pa...@occamsmachete.com> wrote:

The non-symmetry of the [B'A] and the fact that it is calculated from two models leads me to a rather heavy handed approach at least for a first cut. 

Let me know if this seems right:

//calculate the 'cross' co-occurrence matrix
    B = PreparePreferenceMatrixJob using user purchase prefs
    A = PreparePreferenceMatrixJob using user view prefs
    // note that users and items *must* be the same for A and B, their ids must map to the same things and this may be a challenge.
    B' = TransposeJob on B
    [B'A] = MatrixMultJob on B', A

Now in the standard recommender we get the magic with RowSimilarity and  'partial' multiplies. I haven't teased the partial multiplies apart but I suspect that since they use and rely on the output from RowSimilarityJob I'll need to rework this--please correct me if I'm wrong. Once I have [B'A] I need to :
   [B'A] * H_v, where H_v is the original user history vectors in A based on user's views. I think they need to be column vectors so H_v = A' so 
   [B'A]A' = DitributedRowMatrix of recommendations by user.

I'm most interested in item similarity so I think the [B'A] needs RowSimilarityJob run on it but it is the columns I need to compare (???) so 
   [B'A]' = rows of items with values that are views that lead to (co-occur with) purchases
   RowSimilarityJob on [B'A]' will calculate pairwise similarity of items and so will create a matrix of item similarities. Here I suppose I can apply any of the similarity classes.

Question:
*  Have I got the item similarity part right, do I need to compare columns of [B'A]?



On Apr 3, 2013, at 1:21 AM, Sebastian Schelter <ss...@apache.org> wrote:

RowSimilarityJob outputs a matrix of item similarities in
RecommenderJob. While you can think of this conceptually as A'A, in the
code it is a sparsified matrix which holds the top-k similarities for
item j in the j-th row. This means it is not symmetric.

I don't think you need to run RowSimilarityJob on B'A, I think you would
need an equivalent of RowSimilarityJob to compute B'A. I guess you could
extends the MatrixMultiplicationJob to use the similarity measures from
RowSimilarityJob instead of standard dot products.

I really like the idea of such a cross recommender.

On 03.04.2013 08:33, Ted Dunning wrote:
> Sebastian,
> 
> What about the assumption that the matrix is symmetric?
> 
> A'A is symmetric, but B'A is not.
> 
> 
> On Wed, Apr 3, 2013 at 12:08 AM, Sebastian Schelter <ssc.open@googlemail.com
>> wrote:
> 
>> RowSimilarityJob computes the top-k similar rows to each row of the
>> input matrix. You can think of it as computing A'A and sparsifying the
>> result afterwards. Furthermore it allows to plug in a similarity measure
>> of your choice.
>> 
>> If you want to have a cooccurrence matrix, you can use
>> 
>> o.a.m.math.hadoop.similarity.cooccurrence.measures.CooccurrenceCountSimilarity
>> as similarity measure.
>> 
>> 
>> On 02.04.2013 23:43, Pat Ferrel wrote:
>>> Taking an idea from Ted, I'm working on a cross recommender starting
>> from mahout's m/r implementation of an item-based recommender. We have
>> purchases and views for items by user. It is straightforward to create a
>> recommender on purchases but using views as a predictor of purchases does
>> not work so well--giving us lower precision scores. This is, no doubt,
>> because the events have a lot of noise, views that do not lead to purchases.
>>> 
>>> To help solve this Ted suggests we think of a recommender in two parts:
>>> 
>>> [B'B]h_p = r_p  <== standard item-based recommender using purchases
>>> [B'A]h_v = r_v  <== cross-recommender using views and purchases
>>> r = r_p + r_v   <== linear combination of the two parts is the full
>> recommendation vector
>>> 
>>> These both make recommendations for purchases but method 2 makes cross
>> recommendations based on views. [B'A] is the co-occurrence matrix of views
>> with purchases.
>>> 
>>> From RecommenderJob the 'similarity matrix' is created by:
>>> 
>>> //calculate the co-occurrence matrix
>>>     ToolRunner.run(getConf(), new RowSimilarityJob(), new String[]{
>>>         "--input", new Path(prepPath,
>> PreparePreferenceMatrixJob.RATING_MATRIX).toString(),
>>>         "--output", similarityMatrixPath.toString(),
>>>         "--similarityClassname", similarityClassname,
>>>     …
>>> 
>>> What is the role of RowSimilarityJob here and how does it lead to a
>> co-occurrence matrix? I understand that in the general recommender the
>> co-occurrence matrix is symmetric so columns = rows. Is the co-occurrence
>> matrix actually calculated anywhere in the standard recommender?
>>> 
>>> The output of PreparePreferenceMatrixJob is a DistributedRowMatrix. As a
>> first cut it seems I can do the cross recommender part of the work by:
>>> 
>>> //calculate the 'cross' co-occurrence matrix
>>>     B = PreparePreferenceMatrixJob using user purchase prefs
>>>     A = PreparePreferenceMatrixJob using user view prefs
>>>     // note that users and items must be the same for A and B, their
>> ids must map to the same things
>>>     B' = TransposeJob on B
>>>     [B'A] = MatrixMultJob on B', A
>>>     [B'A]h_v by using the partial multiply process in the standard
>> Recommender
>>>     extract the needed recs
>>> 
>>> Questions:
>>> *  I need to get item similarities perhaps even more importantly than
>> user history based recs. I use the [B'A] columns for this, right? Shouldn't
>> I run RowSimilarityJob on [B'A]'?
>>> *  There are assumptions in some code that the co-occurrence matrix is
>> symmetric and so rows = columns. This is not true of the 'cross'
>> co-occurrence matrix. Are there places I need to account for this?
>>> 
>> 
>> 
> 




Re: cross recommender

Posted by Pat Ferrel <pa...@occamsmachete.com>.
I need to do the equivalent of the xrecommender.mostSimilarItems(long[] itemIDs, int howMany) 

To over simplify this, in the standard Item-Based Recommender this is equivalent to looking at the item similarities from the preference matrix (similarity of item pruchases by user). In the xrecommender case I don't want to know similarity of views by users, do I? Seems wrong to get the similarity based on views alone.

So I was proposing that since the columns of [B'A] correspond to "A" items. Why not transpose [B'A] and run RowSimilairtyJob on it to find all pairwise item similarities from the co-occurrence matrix. The highest values would be returned by  xrecommender.mostSimilarItems(long[] itemIDs, int howMany) 

Is this wrong?

On Apr 5, 2013, at 5:49 AM, Ted Dunning <te...@gmail.com> wrote:

inline


> I'm most interested in item similarity so I think the [B'A] needs RowSimilarityJob run on it but it is the columns I need to compare (???) so 
>   [B'A]' = rows of items with values that are views that lead to (co-occur with) purchases
>   RowSimilarityJob on [B'A]' will calculate pairwise similarity of items and so will create a matrix of item similarities. Here I suppose I can apply any of the similarity classes.

Actually, I think that B'A has rows taken from the b-items and columns taken from the a-items.

Each row of B'A consists of a row of indicators that lead to the recommendation of the item corresponding to that row.  This is a very handy form that needn't be further transformed.

> Question:
> *  Have I got the item similarity part right, do I need to compare columns of [B'A]?

I don't see why you would need to.



Re: cross recommender

Posted by Ted Dunning <te...@gmail.com>.
inline

On Apr 3, 2013, at 6:15 PM, Pat Ferrel wrote:

> The non-symmetry of the [B'A] and the fact that it is calculated from two models leads me to a rather heavy handed approach at least for a first cut. 
> 
> Let me know if this seems right:
> 
> //calculate the 'cross' co-occurrence matrix
>     B = PreparePreferenceMatrixJob using user purchase prefs
>     A = PreparePreferenceMatrixJob using user view prefs
>     // note that users and items *must* be the same for A and B, their ids must map to the same things and this may be a challenge.
>     B' = TransposeJob on B
>     [B'A] = MatrixMultJob on B', A
> 

Actually, only the user id's need to be the same.  The whole point of this approach is that the item id's will be different for A and B.  Even if you conceptually have something where the item id's could be the same, it is good to reserve the right for the set of id's for A to be much larger and more comprehensive than for B.  This just means that we want to use a broad universe of indicators for things.

> Now in the standard recommender we get the magic with RowSimilarity and  'partial' multiplies. I haven't teased the partial multiplies apart but I suspect that since they use and rely on the output from RowSimilarityJob I'll need to rework this--please correct me if I'm wrong. Once I have [B'A] I need to :
>    [B'A] * H_v, where H_v is the original user history vectors in A based on user's views. I think they need to be column vectors so H_v = A' so 
>    [B'A]A' = DitributedRowMatrix of recommendations by user.

H_v could be one of the original history vectors or a novel history vector.  Makes no never-mind.  But you are right about (B'A) A' being historical recommendations for everybody in A.

> I'm most interested in item similarity so I think the [B'A] needs RowSimilarityJob run on it but it is the columns I need to compare (???) so 
>    [B'A]' = rows of items with values that are views that lead to (co-occur with) purchases
>    RowSimilarityJob on [B'A]' will calculate pairwise similarity of items and so will create a matrix of item similarities. Here I suppose I can apply any of the similarity classes.

Actually, I think that B'A has rows taken from the b-items and columns taken from the a-items.

Each row of B'A consists of a row of indicators that lead to the recommendation of the item corresponding to that row.  This is a very handy form that needn't be further transformed.

> Question:
> *  Have I got the item similarity part right, do I need to compare columns of [B'A]?

I don't see why you would need to.


Re: cross recommender

Posted by Pat Ferrel <pa...@occamsmachete.com>.
The non-symmetry of the [B'A] and the fact that it is calculated from two models leads me to a rather heavy handed approach at least for a first cut. 

Let me know if this seems right:

 //calculate the 'cross' co-occurrence matrix
     B = PreparePreferenceMatrixJob using user purchase prefs
     A = PreparePreferenceMatrixJob using user view prefs
     // note that users and items *must* be the same for A and B, their ids must map to the same things and this may be a challenge.
     B' = TransposeJob on B
     [B'A] = MatrixMultJob on B', A

Now in the standard recommender we get the magic with RowSimilarity and  'partial' multiplies. I haven't teased the partial multiplies apart but I suspect that since they use and rely on the output from RowSimilarityJob I'll need to rework this--please correct me if I'm wrong. Once I have [B'A] I need to :
    [B'A] * H_v, where H_v is the original user history vectors in A based on user's views. I think they need to be column vectors so H_v = A' so 
    [B'A]A' = DitributedRowMatrix of recommendations by user.

I'm most interested in item similarity so I think the [B'A] needs RowSimilarityJob run on it but it is the columns I need to compare (???) so 
    [B'A]' = rows of items with values that are views that lead to (co-occur with) purchases
    RowSimilarityJob on [B'A]' will calculate pairwise similarity of items and so will create a matrix of item similarities. Here I suppose I can apply any of the similarity classes.

Question:
*  Have I got the item similarity part right, do I need to compare columns of [B'A]?



On Apr 3, 2013, at 1:21 AM, Sebastian Schelter <ss...@apache.org> wrote:

RowSimilarityJob outputs a matrix of item similarities in
RecommenderJob. While you can think of this conceptually as A'A, in the
code it is a sparsified matrix which holds the top-k similarities for
item j in the j-th row. This means it is not symmetric.

I don't think you need to run RowSimilarityJob on B'A, I think you would
need an equivalent of RowSimilarityJob to compute B'A. I guess you could
extends the MatrixMultiplicationJob to use the similarity measures from
RowSimilarityJob instead of standard dot products.

I really like the idea of such a cross recommender.

On 03.04.2013 08:33, Ted Dunning wrote:
> Sebastian,
> 
> What about the assumption that the matrix is symmetric?
> 
> A'A is symmetric, but B'A is not.
> 
> 
> On Wed, Apr 3, 2013 at 12:08 AM, Sebastian Schelter <ssc.open@googlemail.com
>> wrote:
> 
>> RowSimilarityJob computes the top-k similar rows to each row of the
>> input matrix. You can think of it as computing A'A and sparsifying the
>> result afterwards. Furthermore it allows to plug in a similarity measure
>> of your choice.
>> 
>> If you want to have a cooccurrence matrix, you can use
>> 
>> o.a.m.math.hadoop.similarity.cooccurrence.measures.CooccurrenceCountSimilarity
>> as similarity measure.
>> 
>> 
>> On 02.04.2013 23:43, Pat Ferrel wrote:
>>> Taking an idea from Ted, I'm working on a cross recommender starting
>> from mahout's m/r implementation of an item-based recommender. We have
>> purchases and views for items by user. It is straightforward to create a
>> recommender on purchases but using views as a predictor of purchases does
>> not work so well--giving us lower precision scores. This is, no doubt,
>> because the events have a lot of noise, views that do not lead to purchases.
>>> 
>>> To help solve this Ted suggests we think of a recommender in two parts:
>>> 
>>> [B'B]h_p = r_p  <== standard item-based recommender using purchases
>>> [B'A]h_v = r_v  <== cross-recommender using views and purchases
>>> r = r_p + r_v   <== linear combination of the two parts is the full
>> recommendation vector
>>> 
>>> These both make recommendations for purchases but method 2 makes cross
>> recommendations based on views. [B'A] is the co-occurrence matrix of views
>> with purchases.
>>> 
>>> From RecommenderJob the 'similarity matrix' is created by:
>>> 
>>>  //calculate the co-occurrence matrix
>>>      ToolRunner.run(getConf(), new RowSimilarityJob(), new String[]{
>>>          "--input", new Path(prepPath,
>> PreparePreferenceMatrixJob.RATING_MATRIX).toString(),
>>>          "--output", similarityMatrixPath.toString(),
>>>          "--similarityClassname", similarityClassname,
>>>      …
>>> 
>>> What is the role of RowSimilarityJob here and how does it lead to a
>> co-occurrence matrix? I understand that in the general recommender the
>> co-occurrence matrix is symmetric so columns = rows. Is the co-occurrence
>> matrix actually calculated anywhere in the standard recommender?
>>> 
>>> The output of PreparePreferenceMatrixJob is a DistributedRowMatrix. As a
>> first cut it seems I can do the cross recommender part of the work by:
>>> 
>>>  //calculate the 'cross' co-occurrence matrix
>>>      B = PreparePreferenceMatrixJob using user purchase prefs
>>>      A = PreparePreferenceMatrixJob using user view prefs
>>>      // note that users and items must be the same for A and B, their
>> ids must map to the same things
>>>      B' = TransposeJob on B
>>>      [B'A] = MatrixMultJob on B', A
>>>      [B'A]h_v by using the partial multiply process in the standard
>> Recommender
>>>      extract the needed recs
>>> 
>>> Questions:
>>> *  I need to get item similarities perhaps even more importantly than
>> user history based recs. I use the [B'A] columns for this, right? Shouldn't
>> I run RowSimilarityJob on [B'A]'?
>>> *  There are assumptions in some code that the co-occurrence matrix is
>> symmetric and so rows = columns. This is not true of the 'cross'
>> co-occurrence matrix. Are there places I need to account for this?
>>> 
>> 
>> 
> 



Re: cross recommender

Posted by Ted Dunning <te...@gmail.com>.
I think that this is OK for cross recommendation.

We have user x term (the query history)

And we have user x sku (the click history).

We don't even care if the click came from a particular search effort.  We
merely want to associate behavior 1 (emitting search terms) to behavior 2
(clicking on skus).  This data should suffice for that.


On Tue, Apr 16, 2013 at 9:11 PM, Nick Kolegraff <ni...@gmail.com>wrote:

> You are correct.  We only know the skus clicked.
>
>
> On Tue, Apr 16, 2013 at 1:46 PM, Pat Ferrel <pa...@gmail.com> wrote:
>
> > Hmm, I looked at the Kaggle description and there is no record of the
> > queries except for terms. So we do not know the results of the search,
> only
> > the skus clicked. Unless I missed something this is a problem for my use.
> >
> > However the search terms are known so Ted's use case might work. You can
> > infer the search from the data, just not all search results.
> >
> > On Apr 16, 2013, at 1:24 PM, Pat Ferrel <pa...@occamsmachete.com> wrote:
> >
> > I think Ted is talking about a different application of this idea:
> > http://www.slideshare.net/tdunning/search-as-recommendation
> >
> > The IDs in my case must be in the same space, at very least the user IDs
> > need to match. Since in retail apps views are a superset of
> purchases--all
> > purchases are viewed but not the other way around. So we need data
> > something like all clicked items are seen in a search result but not all
> > seen items are clicked. If we have user IDs for all item IDs--either
> > clicked or shown in a search result--we are ok.
> >
> > The data does get split but by action and the user ID space is the same:
> > Set 1: userID, skuID, 1 for clicked action
> > Set 2: userID, skuID, 1 for search result item viewed (one preference for
> > each item in the results page one user ID for all items seen)
> >
> > The technique is interesting because it's flexible and in effect learns
> > multi-hop inferences.
> >
> > On Apr 16, 2013, at 11:56 AM, Nick Kolegraff <ni...@gmail.com>
> > wrote:
> >
> > yep, product images are there as well.
> > have a go here:
> >
> >
> https://bbyopen.com/documentation/products-api/product-attributes#TableImages
> >
> > What Ted said. (if I understand correctly)
> > You could create two datasets from the one with:
> >
> > A dataset with:
> > userID,skuID,1
> >
> > Another with:
> > searchID,skuID,1
> >
> > Timestamps are there too if you want to get clever with preferences
> rather
> > than binary.
> > (i'd scrub the search terms before mapping them to IDs too)
> >
> > I also have an image with all this data packaged on AWS inside a postgres
> > database if you wanted to fart around with it.
> > in public images just do a search for "ACM hackathon" and you should see
> > it.   Feel free to ping me off list with specific questions on that.
> >
> >
> > On Tue, Apr 16, 2013 at 10:29 AM, Ted Dunning <te...@gmail.com>
> > wrote:
> >
> > > Primary action can be emitting a search term.  Secondary can be click
> to
> > > view.
> > >
> > >
> > > On Tue, Apr 16, 2013 at 4:53 PM, Pat Ferrel <pa...@gmail.com>
> > wrote:
> > >
> > >> For the cross-recommender we need some replacement for a primary
> > >> action--purchases and a secondary action--views, clicks, impressions,
> > >> something.
> > >>
> > >> To use this data we would treat clicks like a purchase--the primary
> > > action
> > >> we want to recommend. Then the search-result-item-impressions is like
> a
> > >> view in the x-recommender description. In this case the SRII is an
> item
> > >> seen on a search results page. Each SRII would come with a user ID,
> > > itemID,
> > >> and implicit preference. Clicks also come with userID, itemID and
> > > implicit
> > >> preference.
> > >>
> > >> The cross-recommender would have the effect of finding click
> > >> recommendations from search result item impressions. At very least
> this
> > >> seems like a way to use clicks to re-rank search results.
> > >>
> > >> Is this good enough for testing the x-recommender algo? Do we have
> SRIIs
> > >> with item ID and user ID? Maybe there are product page URLs we can use
> > as
> > >> item ids? I'll look, thanks.
> > >>
> > >>
> > >> On Apr 15, 2013, at 5:52 PM, Nick Kolegraff <ni...@gmail.com>
> > >> wrote:
> > >>
> > >> Hey Guys,
> > >> This is a dataset that kinda fits the bill, sorta -- probably the
> > closest
> > >> thing out there.  I got this extracted from BestBuy.  Now, while it is
> > > more
> > >> focused on 'search' opposed to recommendations...could probably double
> > > for
> > >> a recs problem.
> > >>
> > >> basically, each userid is mapped to a query that resulted in a click
> on
> > a
> > >> particular sku (product_id).  They are the real skus as well, so they
> > can
> > >> map back to real products in their products api (this data is also
> > > provided
> > >> in bulk on kaggle):
> > >>
> > >> https://bbyopen.com/api-profiles/products-api
> > >> http://www.kaggle.com/c/acm-sf-chapter-hackathon-big/data
> > >>
> > >>
> > >> On Mon, Apr 15, 2013 at 2:03 PM, Pat Ferrel <pa...@gmail.com>
> > > wrote:
> > >>
> > >>> MAJOR may be too tame a word.
> > >>>
> > >>> Furthermore there are several enhancements the community could make
> to
> > >>> support retail data and retail recommenders. For one thing without
> > > public
> > >>> data a *public* cross-recommender will probably not get built.
> > >>>
> > >>> The cross-recommender needs to separate actions types and use them in
> > >>> slightly different ways so it is important to have a data set with
> > > user's
> > >>> purchases  but also views, add-to-cart, impressions, purchases in
> > > groups
> > >>> (shopping carts)--whatever events are available with anonymized user
> > > IDs.
> > >>>
> > >>> This data set would be significant in getting new techniques into the
> > >>> community and therefore back to people like you.
> > >>>
> > >>> On Apr 15, 2013, at 9:49 AM, Koobas <ko...@gmail.com> wrote:
> > >>>
> > >>> Definitely of MAJOR interest.
> > >>> I am sure it would also draw all kinds of desired attention to your
> > >>> business.
> > >>> Movie Lens is way too small to be meaningful any more.
> > >>> Wikipedia articles and Stackoverflow tags are not retail data!
> > >>> By all means, post some real retail data, if you can.
> > >>> Meaningful sizes would be appreciated: millions of customers,
> > >>> thousands - tens of thousands products.
> > >>>
> > >>>
> > >>> On Mon, Apr 15, 2013 at 12:27 PM, Robin Morris <rd...@baynote.com>
> > > wrote:
> > >>>
> > >>>> I asked management here a while ago whether there would be a problem
> > >> with
> > >>>> releasing an anonymized set of data from one of our retail
> customers,
> > >> and
> > >>>> didn't get too much push-back.  If this is something that would be
> of
> > >>>> major interest, I can ask again and see whether there's something we
> > > can
> > >>>> put out as a community resource.
> > >>>>
> > >>>> Robin
> > >>>>
> > >>>>
> > >>>> On 4/10/13 8:37 PM, "Pat Ferrel" <pa...@occamsmachete.com> wrote:
> > >>>>
> > >>>>> I have retail data but can't publish results from it. If I could
> get
> > > a
> > >>>>> public sample I'd share how the technique worked out.
> > >>>>>
> > >>>>> Not sure how to simulate this data. It has the important
> > > characteristic
> > >>>>> that every purchase is also a view but not the other way around and
> > >>> Ted's
> > >>>>> technique is a way to scrub the views that don't lead to purchases.
> > > All
> > >>>>> these are implicit preferences but that's not the important part
> for
> > >>> this
> > >>>>> technique.
> > >>>>>
> > >>>>> On Apr 10, 2013, at 4:15 PM, Koobas <ko...@gmail.com> wrote:
> > >>>>>
> > >>>>> Retail data may be hard to impossible, but one can improvise.
> > >>>>> It seems to be fairly common to use Wikipedia articles (Myrrix,
> > >>> GraphLab).
> > >>>>> Another idea is to use StackOverflow tags (Myrrix examples).
> > >>>>> Although they are only good for emulating implicit feedback.
> > >>>>>
> > >>>>>
> > >>>>> On Wed, Apr 10, 2013 at 6:48 PM, Ted Dunning <
> ted.dunning@gmail.com>
> > >>>>> wrote:
> > >>>>>
> > >>>>>> On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <
> pat@occamsmachete.com
> > >>
> > >>>>>> wrote:
> > >>>>>>
> > >>>>>>> Does anyone know of a public data set that provides things like
> > > views
> > >>>>>>> and
> > >>>>>>> purchases?
> > >>>>>>>
> > >>>>>>
> > >>>>>> I don't.
> > >>>>>>
> > >>>>>
> > >>>>
> > >>>>
> > >>>
> > >>>
> > >>
> > >>
> > >
> >
> >
> >
>

Re: cross recommender

Posted by Nick Kolegraff <ni...@gmail.com>.
You are correct.  We only know the skus clicked.


On Tue, Apr 16, 2013 at 1:46 PM, Pat Ferrel <pa...@gmail.com> wrote:

> Hmm, I looked at the Kaggle description and there is no record of the
> queries except for terms. So we do not know the results of the search, only
> the skus clicked. Unless I missed something this is a problem for my use.
>
> However the search terms are known so Ted's use case might work. You can
> infer the search from the data, just not all search results.
>
> On Apr 16, 2013, at 1:24 PM, Pat Ferrel <pa...@occamsmachete.com> wrote:
>
> I think Ted is talking about a different application of this idea:
> http://www.slideshare.net/tdunning/search-as-recommendation
>
> The IDs in my case must be in the same space, at very least the user IDs
> need to match. Since in retail apps views are a superset of purchases--all
> purchases are viewed but not the other way around. So we need data
> something like all clicked items are seen in a search result but not all
> seen items are clicked. If we have user IDs for all item IDs--either
> clicked or shown in a search result--we are ok.
>
> The data does get split but by action and the user ID space is the same:
> Set 1: userID, skuID, 1 for clicked action
> Set 2: userID, skuID, 1 for search result item viewed (one preference for
> each item in the results page one user ID for all items seen)
>
> The technique is interesting because it's flexible and in effect learns
> multi-hop inferences.
>
> On Apr 16, 2013, at 11:56 AM, Nick Kolegraff <ni...@gmail.com>
> wrote:
>
> yep, product images are there as well.
> have a go here:
>
> https://bbyopen.com/documentation/products-api/product-attributes#TableImages
>
> What Ted said. (if I understand correctly)
> You could create two datasets from the one with:
>
> A dataset with:
> userID,skuID,1
>
> Another with:
> searchID,skuID,1
>
> Timestamps are there too if you want to get clever with preferences rather
> than binary.
> (i'd scrub the search terms before mapping them to IDs too)
>
> I also have an image with all this data packaged on AWS inside a postgres
> database if you wanted to fart around with it.
> in public images just do a search for "ACM hackathon" and you should see
> it.   Feel free to ping me off list with specific questions on that.
>
>
> On Tue, Apr 16, 2013 at 10:29 AM, Ted Dunning <te...@gmail.com>
> wrote:
>
> > Primary action can be emitting a search term.  Secondary can be click to
> > view.
> >
> >
> > On Tue, Apr 16, 2013 at 4:53 PM, Pat Ferrel <pa...@gmail.com>
> wrote:
> >
> >> For the cross-recommender we need some replacement for a primary
> >> action--purchases and a secondary action--views, clicks, impressions,
> >> something.
> >>
> >> To use this data we would treat clicks like a purchase--the primary
> > action
> >> we want to recommend. Then the search-result-item-impressions is like a
> >> view in the x-recommender description. In this case the SRII is an item
> >> seen on a search results page. Each SRII would come with a user ID,
> > itemID,
> >> and implicit preference. Clicks also come with userID, itemID and
> > implicit
> >> preference.
> >>
> >> The cross-recommender would have the effect of finding click
> >> recommendations from search result item impressions. At very least this
> >> seems like a way to use clicks to re-rank search results.
> >>
> >> Is this good enough for testing the x-recommender algo? Do we have SRIIs
> >> with item ID and user ID? Maybe there are product page URLs we can use
> as
> >> item ids? I'll look, thanks.
> >>
> >>
> >> On Apr 15, 2013, at 5:52 PM, Nick Kolegraff <ni...@gmail.com>
> >> wrote:
> >>
> >> Hey Guys,
> >> This is a dataset that kinda fits the bill, sorta -- probably the
> closest
> >> thing out there.  I got this extracted from BestBuy.  Now, while it is
> > more
> >> focused on 'search' opposed to recommendations...could probably double
> > for
> >> a recs problem.
> >>
> >> basically, each userid is mapped to a query that resulted in a click on
> a
> >> particular sku (product_id).  They are the real skus as well, so they
> can
> >> map back to real products in their products api (this data is also
> > provided
> >> in bulk on kaggle):
> >>
> >> https://bbyopen.com/api-profiles/products-api
> >> http://www.kaggle.com/c/acm-sf-chapter-hackathon-big/data
> >>
> >>
> >> On Mon, Apr 15, 2013 at 2:03 PM, Pat Ferrel <pa...@gmail.com>
> > wrote:
> >>
> >>> MAJOR may be too tame a word.
> >>>
> >>> Furthermore there are several enhancements the community could make to
> >>> support retail data and retail recommenders. For one thing without
> > public
> >>> data a *public* cross-recommender will probably not get built.
> >>>
> >>> The cross-recommender needs to separate actions types and use them in
> >>> slightly different ways so it is important to have a data set with
> > user's
> >>> purchases  but also views, add-to-cart, impressions, purchases in
> > groups
> >>> (shopping carts)--whatever events are available with anonymized user
> > IDs.
> >>>
> >>> This data set would be significant in getting new techniques into the
> >>> community and therefore back to people like you.
> >>>
> >>> On Apr 15, 2013, at 9:49 AM, Koobas <ko...@gmail.com> wrote:
> >>>
> >>> Definitely of MAJOR interest.
> >>> I am sure it would also draw all kinds of desired attention to your
> >>> business.
> >>> Movie Lens is way too small to be meaningful any more.
> >>> Wikipedia articles and Stackoverflow tags are not retail data!
> >>> By all means, post some real retail data, if you can.
> >>> Meaningful sizes would be appreciated: millions of customers,
> >>> thousands - tens of thousands products.
> >>>
> >>>
> >>> On Mon, Apr 15, 2013 at 12:27 PM, Robin Morris <rd...@baynote.com>
> > wrote:
> >>>
> >>>> I asked management here a while ago whether there would be a problem
> >> with
> >>>> releasing an anonymized set of data from one of our retail customers,
> >> and
> >>>> didn't get too much push-back.  If this is something that would be of
> >>>> major interest, I can ask again and see whether there's something we
> > can
> >>>> put out as a community resource.
> >>>>
> >>>> Robin
> >>>>
> >>>>
> >>>> On 4/10/13 8:37 PM, "Pat Ferrel" <pa...@occamsmachete.com> wrote:
> >>>>
> >>>>> I have retail data but can't publish results from it. If I could get
> > a
> >>>>> public sample I'd share how the technique worked out.
> >>>>>
> >>>>> Not sure how to simulate this data. It has the important
> > characteristic
> >>>>> that every purchase is also a view but not the other way around and
> >>> Ted's
> >>>>> technique is a way to scrub the views that don't lead to purchases.
> > All
> >>>>> these are implicit preferences but that's not the important part for
> >>> this
> >>>>> technique.
> >>>>>
> >>>>> On Apr 10, 2013, at 4:15 PM, Koobas <ko...@gmail.com> wrote:
> >>>>>
> >>>>> Retail data may be hard to impossible, but one can improvise.
> >>>>> It seems to be fairly common to use Wikipedia articles (Myrrix,
> >>> GraphLab).
> >>>>> Another idea is to use StackOverflow tags (Myrrix examples).
> >>>>> Although they are only good for emulating implicit feedback.
> >>>>>
> >>>>>
> >>>>> On Wed, Apr 10, 2013 at 6:48 PM, Ted Dunning <te...@gmail.com>
> >>>>> wrote:
> >>>>>
> >>>>>> On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <pat@occamsmachete.com
> >>
> >>>>>> wrote:
> >>>>>>
> >>>>>>> Does anyone know of a public data set that provides things like
> > views
> >>>>>>> and
> >>>>>>> purchases?
> >>>>>>>
> >>>>>>
> >>>>>> I don't.
> >>>>>>
> >>>>>
> >>>>
> >>>>
> >>>
> >>>
> >>
> >>
> >
>
>
>

Re: cross recommender

Posted by Pat Ferrel <pa...@gmail.com>.
Hmm, I looked at the Kaggle description and there is no record of the queries except for terms. So we do not know the results of the search, only the skus clicked. Unless I missed something this is a problem for my use.

However the search terms are known so Ted's use case might work. You can infer the search from the data, just not all search results. 

On Apr 16, 2013, at 1:24 PM, Pat Ferrel <pa...@occamsmachete.com> wrote:

I think Ted is talking about a different application of this idea: http://www.slideshare.net/tdunning/search-as-recommendation

The IDs in my case must be in the same space, at very least the user IDs need to match. Since in retail apps views are a superset of purchases--all purchases are viewed but not the other way around. So we need data something like all clicked items are seen in a search result but not all seen items are clicked. If we have user IDs for all item IDs--either clicked or shown in a search result--we are ok.

The data does get split but by action and the user ID space is the same: 
Set 1: userID, skuID, 1 for clicked action
Set 2: userID, skuID, 1 for search result item viewed (one preference for each item in the results page one user ID for all items seen)

The technique is interesting because it's flexible and in effect learns multi-hop inferences.

On Apr 16, 2013, at 11:56 AM, Nick Kolegraff <ni...@gmail.com> wrote:

yep, product images are there as well.
have a go here:
https://bbyopen.com/documentation/products-api/product-attributes#TableImages

What Ted said. (if I understand correctly)
You could create two datasets from the one with:

A dataset with:
userID,skuID,1

Another with:
searchID,skuID,1

Timestamps are there too if you want to get clever with preferences rather
than binary.
(i'd scrub the search terms before mapping them to IDs too)

I also have an image with all this data packaged on AWS inside a postgres
database if you wanted to fart around with it.
in public images just do a search for "ACM hackathon" and you should see
it.   Feel free to ping me off list with specific questions on that.


On Tue, Apr 16, 2013 at 10:29 AM, Ted Dunning <te...@gmail.com> wrote:

> Primary action can be emitting a search term.  Secondary can be click to
> view.
> 
> 
> On Tue, Apr 16, 2013 at 4:53 PM, Pat Ferrel <pa...@gmail.com> wrote:
> 
>> For the cross-recommender we need some replacement for a primary
>> action--purchases and a secondary action--views, clicks, impressions,
>> something.
>> 
>> To use this data we would treat clicks like a purchase--the primary
> action
>> we want to recommend. Then the search-result-item-impressions is like a
>> view in the x-recommender description. In this case the SRII is an item
>> seen on a search results page. Each SRII would come with a user ID,
> itemID,
>> and implicit preference. Clicks also come with userID, itemID and
> implicit
>> preference.
>> 
>> The cross-recommender would have the effect of finding click
>> recommendations from search result item impressions. At very least this
>> seems like a way to use clicks to re-rank search results.
>> 
>> Is this good enough for testing the x-recommender algo? Do we have SRIIs
>> with item ID and user ID? Maybe there are product page URLs we can use as
>> item ids? I'll look, thanks.
>> 
>> 
>> On Apr 15, 2013, at 5:52 PM, Nick Kolegraff <ni...@gmail.com>
>> wrote:
>> 
>> Hey Guys,
>> This is a dataset that kinda fits the bill, sorta -- probably the closest
>> thing out there.  I got this extracted from BestBuy.  Now, while it is
> more
>> focused on 'search' opposed to recommendations...could probably double
> for
>> a recs problem.
>> 
>> basically, each userid is mapped to a query that resulted in a click on a
>> particular sku (product_id).  They are the real skus as well, so they can
>> map back to real products in their products api (this data is also
> provided
>> in bulk on kaggle):
>> 
>> https://bbyopen.com/api-profiles/products-api
>> http://www.kaggle.com/c/acm-sf-chapter-hackathon-big/data
>> 
>> 
>> On Mon, Apr 15, 2013 at 2:03 PM, Pat Ferrel <pa...@gmail.com>
> wrote:
>> 
>>> MAJOR may be too tame a word.
>>> 
>>> Furthermore there are several enhancements the community could make to
>>> support retail data and retail recommenders. For one thing without
> public
>>> data a *public* cross-recommender will probably not get built.
>>> 
>>> The cross-recommender needs to separate actions types and use them in
>>> slightly different ways so it is important to have a data set with
> user's
>>> purchases  but also views, add-to-cart, impressions, purchases in
> groups
>>> (shopping carts)--whatever events are available with anonymized user
> IDs.
>>> 
>>> This data set would be significant in getting new techniques into the
>>> community and therefore back to people like you.
>>> 
>>> On Apr 15, 2013, at 9:49 AM, Koobas <ko...@gmail.com> wrote:
>>> 
>>> Definitely of MAJOR interest.
>>> I am sure it would also draw all kinds of desired attention to your
>>> business.
>>> Movie Lens is way too small to be meaningful any more.
>>> Wikipedia articles and Stackoverflow tags are not retail data!
>>> By all means, post some real retail data, if you can.
>>> Meaningful sizes would be appreciated: millions of customers,
>>> thousands - tens of thousands products.
>>> 
>>> 
>>> On Mon, Apr 15, 2013 at 12:27 PM, Robin Morris <rd...@baynote.com>
> wrote:
>>> 
>>>> I asked management here a while ago whether there would be a problem
>> with
>>>> releasing an anonymized set of data from one of our retail customers,
>> and
>>>> didn't get too much push-back.  If this is something that would be of
>>>> major interest, I can ask again and see whether there's something we
> can
>>>> put out as a community resource.
>>>> 
>>>> Robin
>>>> 
>>>> 
>>>> On 4/10/13 8:37 PM, "Pat Ferrel" <pa...@occamsmachete.com> wrote:
>>>> 
>>>>> I have retail data but can't publish results from it. If I could get
> a
>>>>> public sample I'd share how the technique worked out.
>>>>> 
>>>>> Not sure how to simulate this data. It has the important
> characteristic
>>>>> that every purchase is also a view but not the other way around and
>>> Ted's
>>>>> technique is a way to scrub the views that don't lead to purchases.
> All
>>>>> these are implicit preferences but that's not the important part for
>>> this
>>>>> technique.
>>>>> 
>>>>> On Apr 10, 2013, at 4:15 PM, Koobas <ko...@gmail.com> wrote:
>>>>> 
>>>>> Retail data may be hard to impossible, but one can improvise.
>>>>> It seems to be fairly common to use Wikipedia articles (Myrrix,
>>> GraphLab).
>>>>> Another idea is to use StackOverflow tags (Myrrix examples).
>>>>> Although they are only good for emulating implicit feedback.
>>>>> 
>>>>> 
>>>>> On Wed, Apr 10, 2013 at 6:48 PM, Ted Dunning <te...@gmail.com>
>>>>> wrote:
>>>>> 
>>>>>> On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <pat@occamsmachete.com
>> 
>>>>>> wrote:
>>>>>> 
>>>>>>> Does anyone know of a public data set that provides things like
> views
>>>>>>> and
>>>>>>> purchases?
>>>>>>> 
>>>>>> 
>>>>>> I don't.
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
> 



Re: cross recommender

Posted by Pat Ferrel <pa...@occamsmachete.com>.
I think Ted is talking about a different application of this idea: http://www.slideshare.net/tdunning/search-as-recommendation

The IDs in my case must be in the same space, at very least the user IDs need to match. Since in retail apps views are a superset of purchases--all purchases are viewed but not the other way around. So we need data something like all clicked items are seen in a search result but not all seen items are clicked. If we have user IDs for all item IDs--either clicked or shown in a search result--we are ok.

The data does get split but by action and the user ID space is the same: 
Set 1: userID, skuID, 1 for clicked action
Set 2: userID, skuID, 1 for search result item viewed (one preference for each item in the results page one user ID for all items seen)

The technique is interesting because it's flexible and in effect learns multi-hop inferences.

On Apr 16, 2013, at 11:56 AM, Nick Kolegraff <ni...@gmail.com> wrote:

yep, product images are there as well.
have a go here:
https://bbyopen.com/documentation/products-api/product-attributes#TableImages

What Ted said. (if I understand correctly)
You could create two datasets from the one with:

A dataset with:
userID,skuID,1

Another with:
searchID,skuID,1

Timestamps are there too if you want to get clever with preferences rather
than binary.
(i'd scrub the search terms before mapping them to IDs too)

I also have an image with all this data packaged on AWS inside a postgres
database if you wanted to fart around with it.
in public images just do a search for "ACM hackathon" and you should see
it.   Feel free to ping me off list with specific questions on that.


On Tue, Apr 16, 2013 at 10:29 AM, Ted Dunning <te...@gmail.com> wrote:

> Primary action can be emitting a search term.  Secondary can be click to
> view.
> 
> 
> On Tue, Apr 16, 2013 at 4:53 PM, Pat Ferrel <pa...@gmail.com> wrote:
> 
>> For the cross-recommender we need some replacement for a primary
>> action--purchases and a secondary action--views, clicks, impressions,
>> something.
>> 
>> To use this data we would treat clicks like a purchase--the primary
> action
>> we want to recommend. Then the search-result-item-impressions is like a
>> view in the x-recommender description. In this case the SRII is an item
>> seen on a search results page. Each SRII would come with a user ID,
> itemID,
>> and implicit preference. Clicks also come with userID, itemID and
> implicit
>> preference.
>> 
>> The cross-recommender would have the effect of finding click
>> recommendations from search result item impressions. At very least this
>> seems like a way to use clicks to re-rank search results.
>> 
>> Is this good enough for testing the x-recommender algo? Do we have SRIIs
>> with item ID and user ID? Maybe there are product page URLs we can use as
>> item ids? I'll look, thanks.
>> 
>> 
>> On Apr 15, 2013, at 5:52 PM, Nick Kolegraff <ni...@gmail.com>
>> wrote:
>> 
>> Hey Guys,
>> This is a dataset that kinda fits the bill, sorta -- probably the closest
>> thing out there.  I got this extracted from BestBuy.  Now, while it is
> more
>> focused on 'search' opposed to recommendations...could probably double
> for
>> a recs problem.
>> 
>> basically, each userid is mapped to a query that resulted in a click on a
>> particular sku (product_id).  They are the real skus as well, so they can
>> map back to real products in their products api (this data is also
> provided
>> in bulk on kaggle):
>> 
>> https://bbyopen.com/api-profiles/products-api
>> http://www.kaggle.com/c/acm-sf-chapter-hackathon-big/data
>> 
>> 
>> On Mon, Apr 15, 2013 at 2:03 PM, Pat Ferrel <pa...@gmail.com>
> wrote:
>> 
>>> MAJOR may be too tame a word.
>>> 
>>> Furthermore there are several enhancements the community could make to
>>> support retail data and retail recommenders. For one thing without
> public
>>> data a *public* cross-recommender will probably not get built.
>>> 
>>> The cross-recommender needs to separate actions types and use them in
>>> slightly different ways so it is important to have a data set with
> user's
>>> purchases  but also views, add-to-cart, impressions, purchases in
> groups
>>> (shopping carts)--whatever events are available with anonymized user
> IDs.
>>> 
>>> This data set would be significant in getting new techniques into the
>>> community and therefore back to people like you.
>>> 
>>> On Apr 15, 2013, at 9:49 AM, Koobas <ko...@gmail.com> wrote:
>>> 
>>> Definitely of MAJOR interest.
>>> I am sure it would also draw all kinds of desired attention to your
>>> business.
>>> Movie Lens is way too small to be meaningful any more.
>>> Wikipedia articles and Stackoverflow tags are not retail data!
>>> By all means, post some real retail data, if you can.
>>> Meaningful sizes would be appreciated: millions of customers,
>>> thousands - tens of thousands products.
>>> 
>>> 
>>> On Mon, Apr 15, 2013 at 12:27 PM, Robin Morris <rd...@baynote.com>
> wrote:
>>> 
>>>> I asked management here a while ago whether there would be a problem
>> with
>>>> releasing an anonymized set of data from one of our retail customers,
>> and
>>>> didn't get too much push-back.  If this is something that would be of
>>>> major interest, I can ask again and see whether there's something we
> can
>>>> put out as a community resource.
>>>> 
>>>> Robin
>>>> 
>>>> 
>>>> On 4/10/13 8:37 PM, "Pat Ferrel" <pa...@occamsmachete.com> wrote:
>>>> 
>>>>> I have retail data but can't publish results from it. If I could get
> a
>>>>> public sample I'd share how the technique worked out.
>>>>> 
>>>>> Not sure how to simulate this data. It has the important
> characteristic
>>>>> that every purchase is also a view but not the other way around and
>>> Ted's
>>>>> technique is a way to scrub the views that don't lead to purchases.
> All
>>>>> these are implicit preferences but that's not the important part for
>>> this
>>>>> technique.
>>>>> 
>>>>> On Apr 10, 2013, at 4:15 PM, Koobas <ko...@gmail.com> wrote:
>>>>> 
>>>>> Retail data may be hard to impossible, but one can improvise.
>>>>> It seems to be fairly common to use Wikipedia articles (Myrrix,
>>> GraphLab).
>>>>> Another idea is to use StackOverflow tags (Myrrix examples).
>>>>> Although they are only good for emulating implicit feedback.
>>>>> 
>>>>> 
>>>>> On Wed, Apr 10, 2013 at 6:48 PM, Ted Dunning <te...@gmail.com>
>>>>> wrote:
>>>>> 
>>>>>> On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <pat@occamsmachete.com
>> 
>>>>>> wrote:
>>>>>> 
>>>>>>> Does anyone know of a public data set that provides things like
> views
>>>>>>> and
>>>>>>> purchases?
>>>>>>> 
>>>>>> 
>>>>>> I don't.
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
> 


Re: cross recommender

Posted by Nick Kolegraff <ni...@gmail.com>.
yep, product images are there as well.
have a go here:
https://bbyopen.com/documentation/products-api/product-attributes#TableImages

What Ted said. (if I understand correctly)
You could create two datasets from the one with:

A dataset with:
userID,skuID,1

Another with:
searchID,skuID,1

Timestamps are there too if you want to get clever with preferences rather
than binary.
(i'd scrub the search terms before mapping them to IDs too)

I also have an image with all this data packaged on AWS inside a postgres
database if you wanted to fart around with it.
in public images just do a search for "ACM hackathon" and you should see
it.   Feel free to ping me off list with specific questions on that.


On Tue, Apr 16, 2013 at 10:29 AM, Ted Dunning <te...@gmail.com> wrote:

> Primary action can be emitting a search term.  Secondary can be click to
> view.
>
>
> On Tue, Apr 16, 2013 at 4:53 PM, Pat Ferrel <pa...@gmail.com> wrote:
>
> > For the cross-recommender we need some replacement for a primary
> > action--purchases and a secondary action--views, clicks, impressions,
> > something.
> >
> > To use this data we would treat clicks like a purchase--the primary
> action
> > we want to recommend. Then the search-result-item-impressions is like a
> > view in the x-recommender description. In this case the SRII is an item
> > seen on a search results page. Each SRII would come with a user ID,
> itemID,
> > and implicit preference. Clicks also come with userID, itemID and
> implicit
> > preference.
> >
> > The cross-recommender would have the effect of finding click
> > recommendations from search result item impressions. At very least this
> > seems like a way to use clicks to re-rank search results.
> >
> > Is this good enough for testing the x-recommender algo? Do we have SRIIs
> > with item ID and user ID? Maybe there are product page URLs we can use as
> > item ids? I'll look, thanks.
> >
> >
> > On Apr 15, 2013, at 5:52 PM, Nick Kolegraff <ni...@gmail.com>
> > wrote:
> >
> > Hey Guys,
> > This is a dataset that kinda fits the bill, sorta -- probably the closest
> > thing out there.  I got this extracted from BestBuy.  Now, while it is
> more
> > focused on 'search' opposed to recommendations...could probably double
> for
> > a recs problem.
> >
> > basically, each userid is mapped to a query that resulted in a click on a
> > particular sku (product_id).  They are the real skus as well, so they can
> > map back to real products in their products api (this data is also
> provided
> > in bulk on kaggle):
> >
> > https://bbyopen.com/api-profiles/products-api
> > http://www.kaggle.com/c/acm-sf-chapter-hackathon-big/data
> >
> >
> > On Mon, Apr 15, 2013 at 2:03 PM, Pat Ferrel <pa...@gmail.com>
> wrote:
> >
> > > MAJOR may be too tame a word.
> > >
> > > Furthermore there are several enhancements the community could make to
> > > support retail data and retail recommenders. For one thing without
> public
> > > data a *public* cross-recommender will probably not get built.
> > >
> > > The cross-recommender needs to separate actions types and use them in
> > > slightly different ways so it is important to have a data set with
> user's
> > > purchases  but also views, add-to-cart, impressions, purchases in
> groups
> > > (shopping carts)--whatever events are available with anonymized user
> IDs.
> > >
> > > This data set would be significant in getting new techniques into the
> > > community and therefore back to people like you.
> > >
> > > On Apr 15, 2013, at 9:49 AM, Koobas <ko...@gmail.com> wrote:
> > >
> > > Definitely of MAJOR interest.
> > > I am sure it would also draw all kinds of desired attention to your
> > > business.
> > > Movie Lens is way too small to be meaningful any more.
> > > Wikipedia articles and Stackoverflow tags are not retail data!
> > > By all means, post some real retail data, if you can.
> > > Meaningful sizes would be appreciated: millions of customers,
> > > thousands - tens of thousands products.
> > >
> > >
> > > On Mon, Apr 15, 2013 at 12:27 PM, Robin Morris <rd...@baynote.com>
> wrote:
> > >
> > >> I asked management here a while ago whether there would be a problem
> > with
> > >> releasing an anonymized set of data from one of our retail customers,
> > and
> > >> didn't get too much push-back.  If this is something that would be of
> > >> major interest, I can ask again and see whether there's something we
> can
> > >> put out as a community resource.
> > >>
> > >> Robin
> > >>
> > >>
> > >> On 4/10/13 8:37 PM, "Pat Ferrel" <pa...@occamsmachete.com> wrote:
> > >>
> > >>> I have retail data but can't publish results from it. If I could get
> a
> > >>> public sample I'd share how the technique worked out.
> > >>>
> > >>> Not sure how to simulate this data. It has the important
> characteristic
> > >>> that every purchase is also a view but not the other way around and
> > > Ted's
> > >>> technique is a way to scrub the views that don't lead to purchases.
> All
> > >>> these are implicit preferences but that's not the important part for
> > > this
> > >>> technique.
> > >>>
> > >>> On Apr 10, 2013, at 4:15 PM, Koobas <ko...@gmail.com> wrote:
> > >>>
> > >>> Retail data may be hard to impossible, but one can improvise.
> > >>> It seems to be fairly common to use Wikipedia articles (Myrrix,
> > > GraphLab).
> > >>> Another idea is to use StackOverflow tags (Myrrix examples).
> > >>> Although they are only good for emulating implicit feedback.
> > >>>
> > >>>
> > >>> On Wed, Apr 10, 2013 at 6:48 PM, Ted Dunning <te...@gmail.com>
> > >>> wrote:
> > >>>
> > >>>> On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <pat@occamsmachete.com
> >
> > >>>> wrote:
> > >>>>
> > >>>>> Does anyone know of a public data set that provides things like
> views
> > >>>>> and
> > >>>>> purchases?
> > >>>>>
> > >>>>
> > >>>> I don't.
> > >>>>
> > >>>
> > >>
> > >>
> > >
> > >
> >
> >
>

Re: cross recommender

Posted by Ted Dunning <te...@gmail.com>.
Primary action can be emitting a search term.  Secondary can be click to
view.


On Tue, Apr 16, 2013 at 4:53 PM, Pat Ferrel <pa...@gmail.com> wrote:

> For the cross-recommender we need some replacement for a primary
> action--purchases and a secondary action--views, clicks, impressions,
> something.
>
> To use this data we would treat clicks like a purchase--the primary action
> we want to recommend. Then the search-result-item-impressions is like a
> view in the x-recommender description. In this case the SRII is an item
> seen on a search results page. Each SRII would come with a user ID, itemID,
> and implicit preference. Clicks also come with userID, itemID and implicit
> preference.
>
> The cross-recommender would have the effect of finding click
> recommendations from search result item impressions. At very least this
> seems like a way to use clicks to re-rank search results.
>
> Is this good enough for testing the x-recommender algo? Do we have SRIIs
> with item ID and user ID? Maybe there are product page URLs we can use as
> item ids? I'll look, thanks.
>
>
> On Apr 15, 2013, at 5:52 PM, Nick Kolegraff <ni...@gmail.com>
> wrote:
>
> Hey Guys,
> This is a dataset that kinda fits the bill, sorta -- probably the closest
> thing out there.  I got this extracted from BestBuy.  Now, while it is more
> focused on 'search' opposed to recommendations...could probably double for
> a recs problem.
>
> basically, each userid is mapped to a query that resulted in a click on a
> particular sku (product_id).  They are the real skus as well, so they can
> map back to real products in their products api (this data is also provided
> in bulk on kaggle):
>
> https://bbyopen.com/api-profiles/products-api
> http://www.kaggle.com/c/acm-sf-chapter-hackathon-big/data
>
>
> On Mon, Apr 15, 2013 at 2:03 PM, Pat Ferrel <pa...@gmail.com> wrote:
>
> > MAJOR may be too tame a word.
> >
> > Furthermore there are several enhancements the community could make to
> > support retail data and retail recommenders. For one thing without public
> > data a *public* cross-recommender will probably not get built.
> >
> > The cross-recommender needs to separate actions types and use them in
> > slightly different ways so it is important to have a data set with user's
> > purchases  but also views, add-to-cart, impressions, purchases in groups
> > (shopping carts)--whatever events are available with anonymized user IDs.
> >
> > This data set would be significant in getting new techniques into the
> > community and therefore back to people like you.
> >
> > On Apr 15, 2013, at 9:49 AM, Koobas <ko...@gmail.com> wrote:
> >
> > Definitely of MAJOR interest.
> > I am sure it would also draw all kinds of desired attention to your
> > business.
> > Movie Lens is way too small to be meaningful any more.
> > Wikipedia articles and Stackoverflow tags are not retail data!
> > By all means, post some real retail data, if you can.
> > Meaningful sizes would be appreciated: millions of customers,
> > thousands - tens of thousands products.
> >
> >
> > On Mon, Apr 15, 2013 at 12:27 PM, Robin Morris <rd...@baynote.com> wrote:
> >
> >> I asked management here a while ago whether there would be a problem
> with
> >> releasing an anonymized set of data from one of our retail customers,
> and
> >> didn't get too much push-back.  If this is something that would be of
> >> major interest, I can ask again and see whether there's something we can
> >> put out as a community resource.
> >>
> >> Robin
> >>
> >>
> >> On 4/10/13 8:37 PM, "Pat Ferrel" <pa...@occamsmachete.com> wrote:
> >>
> >>> I have retail data but can't publish results from it. If I could get a
> >>> public sample I'd share how the technique worked out.
> >>>
> >>> Not sure how to simulate this data. It has the important characteristic
> >>> that every purchase is also a view but not the other way around and
> > Ted's
> >>> technique is a way to scrub the views that don't lead to purchases. All
> >>> these are implicit preferences but that's not the important part for
> > this
> >>> technique.
> >>>
> >>> On Apr 10, 2013, at 4:15 PM, Koobas <ko...@gmail.com> wrote:
> >>>
> >>> Retail data may be hard to impossible, but one can improvise.
> >>> It seems to be fairly common to use Wikipedia articles (Myrrix,
> > GraphLab).
> >>> Another idea is to use StackOverflow tags (Myrrix examples).
> >>> Although they are only good for emulating implicit feedback.
> >>>
> >>>
> >>> On Wed, Apr 10, 2013 at 6:48 PM, Ted Dunning <te...@gmail.com>
> >>> wrote:
> >>>
> >>>> On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <pa...@occamsmachete.com>
> >>>> wrote:
> >>>>
> >>>>> Does anyone know of a public data set that provides things like views
> >>>>> and
> >>>>> purchases?
> >>>>>
> >>>>
> >>>> I don't.
> >>>>
> >>>
> >>
> >>
> >
> >
>
>

Re: cross recommender

Posted by Pat Ferrel <pa...@gmail.com>.
For the cross-recommender we need some replacement for a primary action--purchases and a secondary action--views, clicks, impressions, something.

To use this data we would treat clicks like a purchase--the primary action we want to recommend. Then the search-result-item-impressions is like a view in the x-recommender description. In this case the SRII is an item seen on a search results page. Each SRII would come with a user ID, itemID, and implicit preference. Clicks also come with userID, itemID and implicit preference. 

The cross-recommender would have the effect of finding click recommendations from search result item impressions. At very least this seems like a way to use clicks to re-rank search results.

Is this good enough for testing the x-recommender algo? Do we have SRIIs with item ID and user ID? Maybe there are product page URLs we can use as item ids? I'll look, thanks.


On Apr 15, 2013, at 5:52 PM, Nick Kolegraff <ni...@gmail.com> wrote:

Hey Guys,
This is a dataset that kinda fits the bill, sorta -- probably the closest
thing out there.  I got this extracted from BestBuy.  Now, while it is more
focused on 'search' opposed to recommendations...could probably double for
a recs problem.

basically, each userid is mapped to a query that resulted in a click on a
particular sku (product_id).  They are the real skus as well, so they can
map back to real products in their products api (this data is also provided
in bulk on kaggle):

https://bbyopen.com/api-profiles/products-api
http://www.kaggle.com/c/acm-sf-chapter-hackathon-big/data


On Mon, Apr 15, 2013 at 2:03 PM, Pat Ferrel <pa...@gmail.com> wrote:

> MAJOR may be too tame a word.
> 
> Furthermore there are several enhancements the community could make to
> support retail data and retail recommenders. For one thing without public
> data a *public* cross-recommender will probably not get built.
> 
> The cross-recommender needs to separate actions types and use them in
> slightly different ways so it is important to have a data set with user's
> purchases  but also views, add-to-cart, impressions, purchases in groups
> (shopping carts)--whatever events are available with anonymized user IDs.
> 
> This data set would be significant in getting new techniques into the
> community and therefore back to people like you.
> 
> On Apr 15, 2013, at 9:49 AM, Koobas <ko...@gmail.com> wrote:
> 
> Definitely of MAJOR interest.
> I am sure it would also draw all kinds of desired attention to your
> business.
> Movie Lens is way too small to be meaningful any more.
> Wikipedia articles and Stackoverflow tags are not retail data!
> By all means, post some real retail data, if you can.
> Meaningful sizes would be appreciated: millions of customers,
> thousands - tens of thousands products.
> 
> 
> On Mon, Apr 15, 2013 at 12:27 PM, Robin Morris <rd...@baynote.com> wrote:
> 
>> I asked management here a while ago whether there would be a problem with
>> releasing an anonymized set of data from one of our retail customers, and
>> didn't get too much push-back.  If this is something that would be of
>> major interest, I can ask again and see whether there's something we can
>> put out as a community resource.
>> 
>> Robin
>> 
>> 
>> On 4/10/13 8:37 PM, "Pat Ferrel" <pa...@occamsmachete.com> wrote:
>> 
>>> I have retail data but can't publish results from it. If I could get a
>>> public sample I'd share how the technique worked out.
>>> 
>>> Not sure how to simulate this data. It has the important characteristic
>>> that every purchase is also a view but not the other way around and
> Ted's
>>> technique is a way to scrub the views that don't lead to purchases. All
>>> these are implicit preferences but that's not the important part for
> this
>>> technique.
>>> 
>>> On Apr 10, 2013, at 4:15 PM, Koobas <ko...@gmail.com> wrote:
>>> 
>>> Retail data may be hard to impossible, but one can improvise.
>>> It seems to be fairly common to use Wikipedia articles (Myrrix,
> GraphLab).
>>> Another idea is to use StackOverflow tags (Myrrix examples).
>>> Although they are only good for emulating implicit feedback.
>>> 
>>> 
>>> On Wed, Apr 10, 2013 at 6:48 PM, Ted Dunning <te...@gmail.com>
>>> wrote:
>>> 
>>>> On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <pa...@occamsmachete.com>
>>>> wrote:
>>>> 
>>>>> Does anyone know of a public data set that provides things like views
>>>>> and
>>>>> purchases?
>>>>> 
>>>> 
>>>> I don't.
>>>> 
>>> 
>> 
>> 
> 
> 


Re: cross recommender

Posted by Nick Kolegraff <ni...@gmail.com>.
Hey Guys,
This is a dataset that kinda fits the bill, sorta -- probably the closest
thing out there.  I got this extracted from BestBuy.  Now, while it is more
focused on 'search' opposed to recommendations...could probably double for
a recs problem.

basically, each userid is mapped to a query that resulted in a click on a
particular sku (product_id).  They are the real skus as well, so they can
map back to real products in their products api (this data is also provided
in bulk on kaggle):

https://bbyopen.com/api-profiles/products-api
http://www.kaggle.com/c/acm-sf-chapter-hackathon-big/data


On Mon, Apr 15, 2013 at 2:03 PM, Pat Ferrel <pa...@gmail.com> wrote:

> MAJOR may be too tame a word.
>
> Furthermore there are several enhancements the community could make to
> support retail data and retail recommenders. For one thing without public
> data a *public* cross-recommender will probably not get built.
>
> The cross-recommender needs to separate actions types and use them in
> slightly different ways so it is important to have a data set with user's
> purchases  but also views, add-to-cart, impressions, purchases in groups
> (shopping carts)--whatever events are available with anonymized user IDs.
>
> This data set would be significant in getting new techniques into the
> community and therefore back to people like you.
>
> On Apr 15, 2013, at 9:49 AM, Koobas <ko...@gmail.com> wrote:
>
> Definitely of MAJOR interest.
> I am sure it would also draw all kinds of desired attention to your
> business.
> Movie Lens is way too small to be meaningful any more.
> Wikipedia articles and Stackoverflow tags are not retail data!
> By all means, post some real retail data, if you can.
> Meaningful sizes would be appreciated: millions of customers,
> thousands - tens of thousands products.
>
>
> On Mon, Apr 15, 2013 at 12:27 PM, Robin Morris <rd...@baynote.com> wrote:
>
> > I asked management here a while ago whether there would be a problem with
> > releasing an anonymized set of data from one of our retail customers, and
> > didn't get too much push-back.  If this is something that would be of
> > major interest, I can ask again and see whether there's something we can
> > put out as a community resource.
> >
> > Robin
> >
> >
> > On 4/10/13 8:37 PM, "Pat Ferrel" <pa...@occamsmachete.com> wrote:
> >
> >> I have retail data but can't publish results from it. If I could get a
> >> public sample I'd share how the technique worked out.
> >>
> >> Not sure how to simulate this data. It has the important characteristic
> >> that every purchase is also a view but not the other way around and
> Ted's
> >> technique is a way to scrub the views that don't lead to purchases. All
> >> these are implicit preferences but that's not the important part for
> this
> >> technique.
> >>
> >> On Apr 10, 2013, at 4:15 PM, Koobas <ko...@gmail.com> wrote:
> >>
> >> Retail data may be hard to impossible, but one can improvise.
> >> It seems to be fairly common to use Wikipedia articles (Myrrix,
> GraphLab).
> >> Another idea is to use StackOverflow tags (Myrrix examples).
> >> Although they are only good for emulating implicit feedback.
> >>
> >>
> >> On Wed, Apr 10, 2013 at 6:48 PM, Ted Dunning <te...@gmail.com>
> >> wrote:
> >>
> >>> On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <pa...@occamsmachete.com>
> >>> wrote:
> >>>
> >>>> Does anyone know of a public data set that provides things like views
> >>>> and
> >>>> purchases?
> >>>>
> >>>
> >>> I don't.
> >>>
> >>
> >
> >
>
>

Re: cross recommender

Posted by Pat Ferrel <pa...@gmail.com>.
MAJOR may be too tame a word.

Furthermore there are several enhancements the community could make to support retail data and retail recommenders. For one thing without public data a *public* cross-recommender will probably not get built.

The cross-recommender needs to separate actions types and use them in slightly different ways so it is important to have a data set with user's purchases  but also views, add-to-cart, impressions, purchases in groups (shopping carts)--whatever events are available with anonymized user IDs.

This data set would be significant in getting new techniques into the community and therefore back to people like you.

On Apr 15, 2013, at 9:49 AM, Koobas <ko...@gmail.com> wrote:

Definitely of MAJOR interest.
I am sure it would also draw all kinds of desired attention to your
business.
Movie Lens is way too small to be meaningful any more.
Wikipedia articles and Stackoverflow tags are not retail data!
By all means, post some real retail data, if you can.
Meaningful sizes would be appreciated: millions of customers,
thousands - tens of thousands products.


On Mon, Apr 15, 2013 at 12:27 PM, Robin Morris <rd...@baynote.com> wrote:

> I asked management here a while ago whether there would be a problem with
> releasing an anonymized set of data from one of our retail customers, and
> didn't get too much push-back.  If this is something that would be of
> major interest, I can ask again and see whether there's something we can
> put out as a community resource.
> 
> Robin
> 
> 
> On 4/10/13 8:37 PM, "Pat Ferrel" <pa...@occamsmachete.com> wrote:
> 
>> I have retail data but can't publish results from it. If I could get a
>> public sample I'd share how the technique worked out.
>> 
>> Not sure how to simulate this data. It has the important characteristic
>> that every purchase is also a view but not the other way around and Ted's
>> technique is a way to scrub the views that don't lead to purchases. All
>> these are implicit preferences but that's not the important part for this
>> technique.
>> 
>> On Apr 10, 2013, at 4:15 PM, Koobas <ko...@gmail.com> wrote:
>> 
>> Retail data may be hard to impossible, but one can improvise.
>> It seems to be fairly common to use Wikipedia articles (Myrrix, GraphLab).
>> Another idea is to use StackOverflow tags (Myrrix examples).
>> Although they are only good for emulating implicit feedback.
>> 
>> 
>> On Wed, Apr 10, 2013 at 6:48 PM, Ted Dunning <te...@gmail.com>
>> wrote:
>> 
>>> On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <pa...@occamsmachete.com>
>>> wrote:
>>> 
>>>> Does anyone know of a public data set that provides things like views
>>>> and
>>>> purchases?
>>>> 
>>> 
>>> I don't.
>>> 
>> 
> 
> 


Re: cross recommender

Posted by Koobas <ko...@gmail.com>.
Definitely of MAJOR interest.
I am sure it would also draw all kinds of desired attention to your
business.
Movie Lens is way too small to be meaningful any more.
Wikipedia articles and Stackoverflow tags are not retail data!
By all means, post some real retail data, if you can.
Meaningful sizes would be appreciated: millions of customers,
thousands - tens of thousands products.


On Mon, Apr 15, 2013 at 12:27 PM, Robin Morris <rd...@baynote.com> wrote:

> I asked management here a while ago whether there would be a problem with
> releasing an anonymized set of data from one of our retail customers, and
> didn't get too much push-back.  If this is something that would be of
> major interest, I can ask again and see whether there's something we can
> put out as a community resource.
>
> Robin
>
>
> On 4/10/13 8:37 PM, "Pat Ferrel" <pa...@occamsmachete.com> wrote:
>
> >I have retail data but can't publish results from it. If I could get a
> >public sample I'd share how the technique worked out.
> >
> >Not sure how to simulate this data. It has the important characteristic
> >that every purchase is also a view but not the other way around and Ted's
> >technique is a way to scrub the views that don't lead to purchases. All
> >these are implicit preferences but that's not the important part for this
> >technique.
> >
> >On Apr 10, 2013, at 4:15 PM, Koobas <ko...@gmail.com> wrote:
> >
> >Retail data may be hard to impossible, but one can improvise.
> >It seems to be fairly common to use Wikipedia articles (Myrrix, GraphLab).
> >Another idea is to use StackOverflow tags (Myrrix examples).
> >Although they are only good for emulating implicit feedback.
> >
> >
> >On Wed, Apr 10, 2013 at 6:48 PM, Ted Dunning <te...@gmail.com>
> >wrote:
> >
> >> On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <pa...@occamsmachete.com>
> >> wrote:
> >>
> >>> Does anyone know of a public data set that provides things like views
> >>>and
> >>> purchases?
> >>>
> >>
> >> I don't.
> >>
> >
>
>

Re: cross recommender

Posted by Robin Morris <rd...@baynote.com>.
I asked management here a while ago whether there would be a problem with
releasing an anonymized set of data from one of our retail customers, and
didn't get too much push-back.  If this is something that would be of
major interest, I can ask again and see whether there's something we can
put out as a community resource.

Robin


On 4/10/13 8:37 PM, "Pat Ferrel" <pa...@occamsmachete.com> wrote:

>I have retail data but can't publish results from it. If I could get a
>public sample I'd share how the technique worked out.
>
>Not sure how to simulate this data. It has the important characteristic
>that every purchase is also a view but not the other way around and Ted's
>technique is a way to scrub the views that don't lead to purchases. All
>these are implicit preferences but that's not the important part for this
>technique.
>
>On Apr 10, 2013, at 4:15 PM, Koobas <ko...@gmail.com> wrote:
>
>Retail data may be hard to impossible, but one can improvise.
>It seems to be fairly common to use Wikipedia articles (Myrrix, GraphLab).
>Another idea is to use StackOverflow tags (Myrrix examples).
>Although they are only good for emulating implicit feedback.
>
>
>On Wed, Apr 10, 2013 at 6:48 PM, Ted Dunning <te...@gmail.com>
>wrote:
>
>> On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <pa...@occamsmachete.com>
>> wrote:
>> 
>>> Does anyone know of a public data set that provides things like views
>>>and
>>> purchases?
>>> 
>> 
>> I don't.
>> 
>


Re: cross recommender

Posted by Pat Ferrel <pa...@occamsmachete.com>.
I have retail data but can't publish results from it. If I could get a public sample I'd share how the technique worked out.

Not sure how to simulate this data. It has the important characteristic that every purchase is also a view but not the other way around and Ted's technique is a way to scrub the views that don't lead to purchases. All these are implicit preferences but that's not the important part for this technique.

On Apr 10, 2013, at 4:15 PM, Koobas <ko...@gmail.com> wrote:

Retail data may be hard to impossible, but one can improvise.
It seems to be fairly common to use Wikipedia articles (Myrrix, GraphLab).
Another idea is to use StackOverflow tags (Myrrix examples).
Although they are only good for emulating implicit feedback.


On Wed, Apr 10, 2013 at 6:48 PM, Ted Dunning <te...@gmail.com> wrote:

> On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <pa...@occamsmachete.com>
> wrote:
> 
>> Does anyone know of a public data set that provides things like views and
>> purchases?
>> 
> 
> I don't.
> 


Re: cross recommender

Posted by Koobas <ko...@gmail.com>.
Retail data may be hard to impossible, but one can improvise.
It seems to be fairly common to use Wikipedia articles (Myrrix, GraphLab).
Another idea is to use StackOverflow tags (Myrrix examples).
Although they are only good for emulating implicit feedback.


On Wed, Apr 10, 2013 at 6:48 PM, Ted Dunning <te...@gmail.com> wrote:

> On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <pa...@occamsmachete.com>
> wrote:
>
> > Does anyone know of a public data set that provides things like views and
> > purchases?
> >
>
> I don't.
>

Re: cross recommender

Posted by Ted Dunning <te...@gmail.com>.
On Wed, Apr 10, 2013 at 10:38 AM, Pat Ferrel <pa...@occamsmachete.com> wrote:

> Does anyone know of a public data set that provides things like views and
> purchases?
>

I don't.

Re: cross recommender

Posted by Pat Ferrel <pa...@occamsmachete.com>.
BTW I have this working on trivial data and am in the process of measuring it's results on some real world data. It does a lot with DistributedRowMatix and so I'll be interested to see how it performs with a larger data set. 

Does anyone know of a public data set that provides things like views and purchases? 


On Apr 8, 2013, at 2:31 PM, Ted Dunning <te...@gmail.com> wrote:

On Sat, Apr 6, 2013 at 3:26 PM, Pat Ferrel <pa...@occamsmachete.com> wrote:

> I guess I don't understand this issue.
> 
> In my case both the item ids and user ids of the separate DistributedRow
> Matrix will match and I know the size for the entire space from a previous
> step where I create id maps. I suppose you are saying the the m/r code
> would be super simple if a row of B' and a  column of A could be processed
> together, which I understand as an optimal implementation.
> 

Well.... rows of B and A should match so columns of B' and rows of A rather
than the reverse.


> So calculating [B'A] seems like TransposeJob and MultiplyJob and does seem
> to work. You loose the ability to substutute different RowSimilarityJob
> measures. I assume this creates something like the co-occurrence similairty
> measure. But oh, well. Maybe I'll look at that later.
> 

Yes.  Exactly.


> I also see why you say the two matrices A and B don't have to have the
> same size since [B'A]H_v = [B'A]A' so the dimensions will work out as long
> as the users dimension is the same throughout.
> 

Yes.  All we need is user id match.


Re: cross recommender

Posted by Ted Dunning <te...@gmail.com>.
Log-likelihood similarity is a bit of a force-fit of the concept of the
LLR.  It is basically a binarizing and sparsifying filter applied to
cooccurrence counts.

As such, it is eminently suited to implementation using a matrix multiply.


On Fri, Apr 12, 2013 at 8:35 AM, Pat Ferrel <pa...@occamsmachete.com> wrote:

> That looks like the best shortcut. It is one of the few places where the
> rows of one and the columns of the other are seen together. Now I know why
> you transpose the first input :-)
>
> But, I have begun to wonder whether it is the right thing to do for a
> cross recommender because you are comparing a purchase vector to all view
> vectors--like comparing Honey Crisp to Cameo (couldn't resist an apples to
> apples joke). Co-occurrence makes sense but does cosine or log-likelihood?
> Maybe...
>
>
> On Apr 11, 2013, at 10:49 AM, Sebastian Schelter <ss...@apache.org> wrote:
>
> > Do I have to create a SimilarityJob( matrixB, matrixA, similarityType
> ) to get this or have I missed something already in Mahout?
>
> It could be worth to investigate whether MatrixMultiplicationJob could
> be extended to compute similarities instead of dot products.
>
> Best,
> Sebastian
>
>

Re: cross recommender

Posted by Pat Ferrel <pa...@occamsmachete.com>.
That looks like the best shortcut. It is one of the few places where the rows of one and the columns of the other are seen together. Now I know why you transpose the first input :-)

But, I have begun to wonder whether it is the right thing to do for a cross recommender because you are comparing a purchase vector to all view vectors--like comparing Honey Crisp to Cameo (couldn't resist an apples to apples joke). Co-occurrence makes sense but does cosine or log-likelihood? Maybe...

 
On Apr 11, 2013, at 10:49 AM, Sebastian Schelter <ss...@apache.org> wrote:

> Do I have to create a SimilarityJob( matrixB, matrixA, similarityType
) to get this or have I missed something already in Mahout?

It could be worth to investigate whether MatrixMultiplicationJob could
be extended to compute similarities instead of dot products.

Best,
Sebastian


Re: cross recommender

Posted by Sebastian Schelter <ss...@apache.org>.
> Do I have to create a SimilarityJob( matrixB, matrixA, similarityType
) to get this or have I missed something already in Mahout?

It could be worth to investigate whether MatrixMultiplicationJob could
be extended to compute similarities instead of dot products.

Best,
Sebastian

Re: cross recommender

Posted by Pat Ferrel <pa...@occamsmachete.com>.
Getting this running with co-occurrence rather than using a similarity calc on user rows finally forced me to understand what is going on in the base recommender. And the answer implies further work.

[B'B] is usually not calculated in the usual item based recommender. The matrix that comes out of RowSimilairtyJob looking at the purchases input matrix (rows = user) is used. This can be a co-occurrence matrix but is actually a log-likelihood similarity matrix in my case (substitute your favorite similarity measure). 

RowSimilarity works if the rows of one matrix are identical to the columns of the other. However when calculating the "similarity" version of the co-occurrence matrix corresponding to [B'A] you need to look at the similarity of a row in B with all rows in A. This will give us the analogous "similarity" matrix in the standard recommender. 

All is clear if I have this right. So a better generalization of the aglo would use the similarity of rows in B to all rows in A.  So to rename [B'A] to S_ba for clarity S_ba would be the similarity matrix calculated from cross comparisons of rows/users.

This is fundamentally a new mahout job type AFAIK. It's an important question to me because when we looked at similarity measures, log-likelihood gave us considerably better scores in the standard recommender. Also looking at the values in our [B'A] product I suspect it is not sparsified enough, which would be a desired side-effect of using similarity instead of co-occurrence. Also the values are not normalized in the same way as the general recommender so they can't be linearly combined with it.

Do I have to create a SimilarityJob( matrixB, matrixA, similarityType ) to get this or have I missed something already in Mahout?


On Apr 8, 2013, at 2:31 PM, Ted Dunning <te...@gmail.com> wrote:

> So calculating [B'A] seems like TransposeJob and MultiplyJob and does seem
> to work. You loose the ability to substutute different RowSimilarityJob
> measures. I assume this creates something like the co-occurrence similairty
> measure. But oh, well. Maybe I'll look at that later.
> 

Yes.  Exactly.


Re: cross recommender

Posted by Ted Dunning <te...@gmail.com>.
On Sat, Apr 6, 2013 at 3:26 PM, Pat Ferrel <pa...@occamsmachete.com> wrote:

> I guess I don't understand this issue.
>
> In my case both the item ids and user ids of the separate DistributedRow
> Matrix will match and I know the size for the entire space from a previous
> step where I create id maps. I suppose you are saying the the m/r code
> would be super simple if a row of B' and a  column of A could be processed
> together, which I understand as an optimal implementation.
>

Well.... rows of B and A should match so columns of B' and rows of A rather
than the reverse.


> So calculating [B'A] seems like TransposeJob and MultiplyJob and does seem
> to work. You loose the ability to substutute different RowSimilarityJob
> measures. I assume this creates something like the co-occurrence similairty
> measure. But oh, well. Maybe I'll look at that later.
>

Yes.  Exactly.


> I also see why you say the two matrices A and B don't have to have the
> same size since [B'A]H_v = [B'A]A' so the dimensions will work out as long
> as the users dimension is the same throughout.
>

Yes.  All we need is user id match.

Re: cross recommender

Posted by Pat Ferrel <pa...@occamsmachete.com>.
I guess I don't understand this issue.

In my case both the item ids and user ids of the separate DistributedRow Matrix will match and I know the size for the entire space from a previous step where I create id maps. I suppose you are saying the the m/r code would be super simple if a row of B' and a  column of A could be processed together, which I understand as an optimal implementation.

So calculating [B'A] seems like TransposeJob and MultiplyJob and does seem to work. You loose the ability to substutute different RowSimilarityJob measures. I assume this creates something like the co-occurrence similairty measure. But oh, well. Maybe I'll look at that later.

I also see why you say the two matrices A and B don't have to have the same size since [B'A]H_v = [B'A]A' so the dimensions will work out as long as the users dimension is the same throughout.


On Apr 6, 2013, at 7:46 AM, Sebastian Schelter <ss...@apache.org> wrote:

Completely concur with that. MatrixMultiplicationJob is already using a
mapside merge-join AFAIK.


On 05.04.2013 15:04, Ted Dunning wrote:
> This may not quite be true because the RSJ is able to take some liberties.
> 
> The origin of these is that A'A can be viewed as a self join.  Thus as rows of A are read, the cooccurrences can be emitted as they are read.
> 
> For B'A, we have to somehow get corresponding rows of A and B at the same time in the same place.  If both matrices are stored in sparse row-major form, then a map-side merge join would work at the cost of some locality.  You can recover that locality in special cases by a few tricks.  For instance, you might actually store A and B as adjoined rows.  That means that fetching a row of A inherently also gives a row of B.  Not sure how this could come about.  
> 
> A second way to get the locality is to use a system like MapR (conflict of interest alert, vendor specific feature alert, yada yada).  In such a system, you can force files to be co-resident.  In MapR, this is done by setting chunk size to zero and storing A and B in the same volume.  This makes that volume only be stored in a single container which forces all of the files in that volume to have exactly the same replication pattern.  It also makes that volume not scale as well.  When this is feasible, it can result in a massive speed improvement.  I know of one site that does this and reportedly achieves 10-20x speed up because of the decrease in non-local reads.
> 
> A third option is to use a reduce side join.  This would be necessary if A and B were ever not stored with rows in sequential order and were also not randomly accessible.  I would avoid this option if possible.
> 
> On Apr 3, 2013, at 10:21 AM, Sebastian Schelter wrote:
> 
>> I don't think you need to run RowSimilarityJob on B'A, I think you would
>> need an equivalent of RowSimilarityJob to compute B'A. I guess you could
>> extends the MatrixMultiplicationJob to use the similarity measures from
>> RowSimilarityJob instead of standard dot products.
> 
> 



Re: cross recommender

Posted by Sebastian Schelter <ss...@apache.org>.
Completely concur with that. MatrixMultiplicationJob is already using a
mapside merge-join AFAIK.


On 05.04.2013 15:04, Ted Dunning wrote:
> This may not quite be true because the RSJ is able to take some liberties.
> 
> The origin of these is that A'A can be viewed as a self join.  Thus as rows of A are read, the cooccurrences can be emitted as they are read.
> 
> For B'A, we have to somehow get corresponding rows of A and B at the same time in the same place.  If both matrices are stored in sparse row-major form, then a map-side merge join would work at the cost of some locality.  You can recover that locality in special cases by a few tricks.  For instance, you might actually store A and B as adjoined rows.  That means that fetching a row of A inherently also gives a row of B.  Not sure how this could come about.  
> 
> A second way to get the locality is to use a system like MapR (conflict of interest alert, vendor specific feature alert, yada yada).  In such a system, you can force files to be co-resident.  In MapR, this is done by setting chunk size to zero and storing A and B in the same volume.  This makes that volume only be stored in a single container which forces all of the files in that volume to have exactly the same replication pattern.  It also makes that volume not scale as well.  When this is feasible, it can result in a massive speed improvement.  I know of one site that does this and reportedly achieves 10-20x speed up because of the decrease in non-local reads.
> 
> A third option is to use a reduce side join.  This would be necessary if A and B were ever not stored with rows in sequential order and were also not randomly accessible.  I would avoid this option if possible.
> 
> On Apr 3, 2013, at 10:21 AM, Sebastian Schelter wrote:
> 
>> I don't think you need to run RowSimilarityJob on B'A, I think you would
>> need an equivalent of RowSimilarityJob to compute B'A. I guess you could
>> extends the MatrixMultiplicationJob to use the similarity measures from
>> RowSimilarityJob instead of standard dot products.
> 
> 


Re: cross recommender

Posted by Ted Dunning <te...@gmail.com>.
This may not quite be true because the RSJ is able to take some liberties.

The origin of these is that A'A can be viewed as a self join.  Thus as rows of A are read, the cooccurrences can be emitted as they are read.

For B'A, we have to somehow get corresponding rows of A and B at the same time in the same place.  If both matrices are stored in sparse row-major form, then a map-side merge join would work at the cost of some locality.  You can recover that locality in special cases by a few tricks.  For instance, you might actually store A and B as adjoined rows.  That means that fetching a row of A inherently also gives a row of B.  Not sure how this could come about.  

A second way to get the locality is to use a system like MapR (conflict of interest alert, vendor specific feature alert, yada yada).  In such a system, you can force files to be co-resident.  In MapR, this is done by setting chunk size to zero and storing A and B in the same volume.  This makes that volume only be stored in a single container which forces all of the files in that volume to have exactly the same replication pattern.  It also makes that volume not scale as well.  When this is feasible, it can result in a massive speed improvement.  I know of one site that does this and reportedly achieves 10-20x speed up because of the decrease in non-local reads.

A third option is to use a reduce side join.  This would be necessary if A and B were ever not stored with rows in sequential order and were also not randomly accessible.  I would avoid this option if possible.

On Apr 3, 2013, at 10:21 AM, Sebastian Schelter wrote:

> I don't think you need to run RowSimilarityJob on B'A, I think you would
> need an equivalent of RowSimilarityJob to compute B'A. I guess you could
> extends the MatrixMultiplicationJob to use the similarity measures from
> RowSimilarityJob instead of standard dot products.


Re: cross recommender

Posted by Sebastian Schelter <ss...@apache.org>.
RowSimilarityJob outputs a matrix of item similarities in
RecommenderJob. While you can think of this conceptually as A'A, in the
code it is a sparsified matrix which holds the top-k similarities for
item j in the j-th row. This means it is not symmetric.

I don't think you need to run RowSimilarityJob on B'A, I think you would
need an equivalent of RowSimilarityJob to compute B'A. I guess you could
extends the MatrixMultiplicationJob to use the similarity measures from
RowSimilarityJob instead of standard dot products.

I really like the idea of such a cross recommender.

On 03.04.2013 08:33, Ted Dunning wrote:
> Sebastian,
> 
> What about the assumption that the matrix is symmetric?
> 
> A'A is symmetric, but B'A is not.
> 
> 
> On Wed, Apr 3, 2013 at 12:08 AM, Sebastian Schelter <ssc.open@googlemail.com
>> wrote:
> 
>> RowSimilarityJob computes the top-k similar rows to each row of the
>> input matrix. You can think of it as computing A'A and sparsifying the
>> result afterwards. Furthermore it allows to plug in a similarity measure
>> of your choice.
>>
>> If you want to have a cooccurrence matrix, you can use
>>
>> o.a.m.math.hadoop.similarity.cooccurrence.measures.CooccurrenceCountSimilarity
>> as similarity measure.
>>
>>
>> On 02.04.2013 23:43, Pat Ferrel wrote:
>>> Taking an idea from Ted, I'm working on a cross recommender starting
>> from mahout's m/r implementation of an item-based recommender. We have
>> purchases and views for items by user. It is straightforward to create a
>> recommender on purchases but using views as a predictor of purchases does
>> not work so well--giving us lower precision scores. This is, no doubt,
>> because the events have a lot of noise, views that do not lead to purchases.
>>>
>>> To help solve this Ted suggests we think of a recommender in two parts:
>>>
>>> [B'B]h_p = r_p  <== standard item-based recommender using purchases
>>> [B'A]h_v = r_v  <== cross-recommender using views and purchases
>>> r = r_p + r_v   <== linear combination of the two parts is the full
>> recommendation vector
>>>
>>> These both make recommendations for purchases but method 2 makes cross
>> recommendations based on views. [B'A] is the co-occurrence matrix of views
>> with purchases.
>>>
>>> From RecommenderJob the 'similarity matrix' is created by:
>>>
>>>   //calculate the co-occurrence matrix
>>>       ToolRunner.run(getConf(), new RowSimilarityJob(), new String[]{
>>>           "--input", new Path(prepPath,
>> PreparePreferenceMatrixJob.RATING_MATRIX).toString(),
>>>           "--output", similarityMatrixPath.toString(),
>>>           "--similarityClassname", similarityClassname,
>>>       …
>>>
>>> What is the role of RowSimilarityJob here and how does it lead to a
>> co-occurrence matrix? I understand that in the general recommender the
>> co-occurrence matrix is symmetric so columns = rows. Is the co-occurrence
>> matrix actually calculated anywhere in the standard recommender?
>>>
>>> The output of PreparePreferenceMatrixJob is a DistributedRowMatrix. As a
>> first cut it seems I can do the cross recommender part of the work by:
>>>
>>>   //calculate the 'cross' co-occurrence matrix
>>>       B = PreparePreferenceMatrixJob using user purchase prefs
>>>       A = PreparePreferenceMatrixJob using user view prefs
>>>       // note that users and items must be the same for A and B, their
>> ids must map to the same things
>>>       B' = TransposeJob on B
>>>       [B'A] = MatrixMultJob on B', A
>>>       [B'A]h_v by using the partial multiply process in the standard
>> Recommender
>>>       extract the needed recs
>>>
>>> Questions:
>>>  *  I need to get item similarities perhaps even more importantly than
>> user history based recs. I use the [B'A] columns for this, right? Shouldn't
>> I run RowSimilarityJob on [B'A]'?
>>>  *  There are assumptions in some code that the co-occurrence matrix is
>> symmetric and so rows = columns. This is not true of the 'cross'
>> co-occurrence matrix. Are there places I need to account for this?
>>>
>>
>>
> 


Re: cross recommender

Posted by Ted Dunning <te...@gmail.com>.
Sebastian,

What about the assumption that the matrix is symmetric?

A'A is symmetric, but B'A is not.


On Wed, Apr 3, 2013 at 12:08 AM, Sebastian Schelter <ssc.open@googlemail.com
> wrote:

> RowSimilarityJob computes the top-k similar rows to each row of the
> input matrix. You can think of it as computing A'A and sparsifying the
> result afterwards. Furthermore it allows to plug in a similarity measure
> of your choice.
>
> If you want to have a cooccurrence matrix, you can use
>
> o.a.m.math.hadoop.similarity.cooccurrence.measures.CooccurrenceCountSimilarity
> as similarity measure.
>
>
> On 02.04.2013 23:43, Pat Ferrel wrote:
> > Taking an idea from Ted, I'm working on a cross recommender starting
> from mahout's m/r implementation of an item-based recommender. We have
> purchases and views for items by user. It is straightforward to create a
> recommender on purchases but using views as a predictor of purchases does
> not work so well--giving us lower precision scores. This is, no doubt,
> because the events have a lot of noise, views that do not lead to purchases.
> >
> > To help solve this Ted suggests we think of a recommender in two parts:
> >
> > [B'B]h_p = r_p  <== standard item-based recommender using purchases
> > [B'A]h_v = r_v  <== cross-recommender using views and purchases
> > r = r_p + r_v   <== linear combination of the two parts is the full
> recommendation vector
> >
> > These both make recommendations for purchases but method 2 makes cross
> recommendations based on views. [B'A] is the co-occurrence matrix of views
> with purchases.
> >
> > From RecommenderJob the 'similarity matrix' is created by:
> >
> >   //calculate the co-occurrence matrix
> >       ToolRunner.run(getConf(), new RowSimilarityJob(), new String[]{
> >           "--input", new Path(prepPath,
> PreparePreferenceMatrixJob.RATING_MATRIX).toString(),
> >           "--output", similarityMatrixPath.toString(),
> >           "--similarityClassname", similarityClassname,
> >       …
> >
> > What is the role of RowSimilarityJob here and how does it lead to a
> co-occurrence matrix? I understand that in the general recommender the
> co-occurrence matrix is symmetric so columns = rows. Is the co-occurrence
> matrix actually calculated anywhere in the standard recommender?
> >
> > The output of PreparePreferenceMatrixJob is a DistributedRowMatrix. As a
> first cut it seems I can do the cross recommender part of the work by:
> >
> >   //calculate the 'cross' co-occurrence matrix
> >       B = PreparePreferenceMatrixJob using user purchase prefs
> >       A = PreparePreferenceMatrixJob using user view prefs
> >       // note that users and items must be the same for A and B, their
> ids must map to the same things
> >       B' = TransposeJob on B
> >       [B'A] = MatrixMultJob on B', A
> >       [B'A]h_v by using the partial multiply process in the standard
> Recommender
> >       extract the needed recs
> >
> > Questions:
> >  *  I need to get item similarities perhaps even more importantly than
> user history based recs. I use the [B'A] columns for this, right? Shouldn't
> I run RowSimilarityJob on [B'A]'?
> >  *  There are assumptions in some code that the co-occurrence matrix is
> symmetric and so rows = columns. This is not true of the 'cross'
> co-occurrence matrix. Are there places I need to account for this?
> >
>
>

Re: cross recommender

Posted by Sebastian Schelter <ss...@googlemail.com>.
RowSimilarityJob computes the top-k similar rows to each row of the
input matrix. You can think of it as computing A'A and sparsifying the
result afterwards. Furthermore it allows to plug in a similarity measure
of your choice.

If you want to have a cooccurrence matrix, you can use
o.a.m.math.hadoop.similarity.cooccurrence.measures.CooccurrenceCountSimilarity
as similarity measure.


On 02.04.2013 23:43, Pat Ferrel wrote:
> Taking an idea from Ted, I'm working on a cross recommender starting from mahout's m/r implementation of an item-based recommender. We have purchases and views for items by user. It is straightforward to create a recommender on purchases but using views as a predictor of purchases does not work so well--giving us lower precision scores. This is, no doubt, because the events have a lot of noise, views that do not lead to purchases.
> 
> To help solve this Ted suggests we think of a recommender in two parts:
> 
> [B'B]h_p = r_p  <== standard item-based recommender using purchases
> [B'A]h_v = r_v  <== cross-recommender using views and purchases
> r = r_p + r_v   <== linear combination of the two parts is the full recommendation vector
> 
> These both make recommendations for purchases but method 2 makes cross recommendations based on views. [B'A] is the co-occurrence matrix of views with purchases. 
> 
> From RecommenderJob the 'similarity matrix' is created by:
> 
>   //calculate the co-occurrence matrix
>       ToolRunner.run(getConf(), new RowSimilarityJob(), new String[]{
>           "--input", new Path(prepPath, PreparePreferenceMatrixJob.RATING_MATRIX).toString(),
>           "--output", similarityMatrixPath.toString(),
>           "--similarityClassname", similarityClassname,
>       …
> 
> What is the role of RowSimilarityJob here and how does it lead to a co-occurrence matrix? I understand that in the general recommender the co-occurrence matrix is symmetric so columns = rows. Is the co-occurrence matrix actually calculated anywhere in the standard recommender?
> 
> The output of PreparePreferenceMatrixJob is a DistributedRowMatrix. As a first cut it seems I can do the cross recommender part of the work by:
> 
>   //calculate the 'cross' co-occurrence matrix
>       B = PreparePreferenceMatrixJob using user purchase prefs
>       A = PreparePreferenceMatrixJob using user view prefs
>       // note that users and items must be the same for A and B, their ids must map to the same things
>       B' = TransposeJob on B
>       [B'A] = MatrixMultJob on B', A
>       [B'A]h_v by using the partial multiply process in the standard Recommender 
>       extract the needed recs
> 
> Questions:
>  *  I need to get item similarities perhaps even more importantly than user history based recs. I use the [B'A] columns for this, right? Shouldn't I run RowSimilarityJob on [B'A]'?
>  *  There are assumptions in some code that the co-occurrence matrix is symmetric and so rows = columns. This is not true of the 'cross' co-occurrence matrix. Are there places I need to account for this?
>