Re: Singular vectors of a recommendation Item-Item space

2011-08-31 Thread Lance Norskog
Yup! The last two lines break the backlash-right clause. Cool tool! Thanks. On Wed, Aug 31, 2011 at 8:57 PM, Ted Dunning wrote: > Hmm... I see this: > > > http://latex.codecogs.com/gif.latex?F(x,y)=0%20~~\mbox{and}~~%20\left|%20\begin{array}{ccc}%20F''_{xx}%20&%20F''_{xy}%20&%20F'_x%20\\%20F''_

Re: Singular vectors of a recommendation Item-Item space

2011-08-31 Thread Ted Dunning
Hmm... I see this: http://latex.codecogs.com/gif.latex?F(x,y)=0%20~~\mbox{and}~~%20\left|%20\begin{array}{ccc}%20F''_{xx}%20&%20F''_{xy}%20&%20F'_x%20\\%20F''_{yx}%20&%20F''_{yy}%20&%20F'_y%20\\%20F'_x%20&%20F'_y%20&%200%20\end{array}\right|%20=%200 Must be a cut and paste kind of thing. On Wed,

Re: Singular vectors of a recommendation Item-Item space

2011-08-31 Thread Ken Krugler
On Aug 31, 2011, at 8:32pm, Ted Dunning wrote: > The basics of latex notation are > > ^ for superscript > _ for subscript > {} for grouping > \sum for summation > \log for logs > \Omega for upper case greek letter omega > \alpha for lower case greek letter beta > \int for integral. > > Se

Re: Singular vectors of a recommendation Item-Item space

2011-08-31 Thread Ted Dunning
The basics of latex notation are ^ for superscript _ for subscript {} for grouping \sum for summation \log for logs \Omega for upper case greek letter omega \alpha for lower case greek letter beta \int for integral. See http://www.codecogs.com/latex/eqneditor.php for a playground where you

Re: Singular vectors of a recommendation Item-Item space

2011-08-31 Thread Ted Dunning
This is a very good point that seems very likely to be the source of the confusion. On Wed, Aug 31, 2011 at 6:06 PM, Dmitriy Lyubimov wrote: > Perhaps confusion may be stemming from the fact that inverse equal > transpose if matrices are orthogonal (or even orthonormal), so > sometimes Q^{-1}\eq

Re: Singular vectors of a recommendation Item-Item space

2011-08-31 Thread Dmitriy Lyubimov
PS > On Wed, Aug 31, 2011 at 3:57 PM, Lance Norskog wrote: >> >> I see a fair amount of stuff here in what I think is MathML, but is displays >> raw in gmail. >> this is usually tex. I am not familiar with mathml that close but i think it is fundamentally different

Re: Singular vectors of a recommendation Item-Item space

2011-08-31 Thread Dmitriy Lyubimov
we usually denote inverse , A^{-1} or just A^-1 Apostrophe, superscript star or {top} always mean transpose. I never saw apostrophe to be used for inverses. Perhaps confusion may be stemming from the fact that inverse equal transpose if matrices are orthogonal (or even orthonormal), so sometimes

Re: Singular vectors of a recommendation Item-Item space

2011-08-31 Thread Lance Norskog
In this text-only notation, I though apostrophe meant inverse. What then is matrix inversion? I see a fair amount of stuff here in what I think is MathML, but is displays raw in gmail. On Wed, Aug 31, 2011 at 8:04 AM, Ted Dunning wrote: > Uhh... > > A' is the transpose of A. Not the inverse. >

Re: Singular vectors of a recommendation Item-Item space

2011-08-31 Thread Ted Dunning
Mathematically speaking, random sampling is just fine. Stratifying based on various criteria can help avoid loss of accuracy so if you had several clusters then down sampling heavily represented clusters might work, but the accurate definition of clusters is harder than the cooccurrence analysis t

Re: Singular vectors of a recommendation Item-Item space

2011-08-31 Thread Ted Dunning
Uhh... A' is the transpose of A. Not the inverse. A' A *is* the summation version. On Wed, Aug 31, 2011 at 1:24 AM, Lance Norskog wrote: > "Also, if your original matrix is A, then it is usually a shorter path to > results to analyze the word (item) cooccurrence matrix A'A. The methods > bel

Re: Singular vectors of a recommendation Item-Item space

2011-08-31 Thread Lance Norskog
"If you have a document (user) and a word (item), then you have a joint probability that any given interaction will be between this document and word. We pretend in this case that each interaction is independent of every other which is patently not true, but very helpful." So if you subsample ran

Re: Singular vectors of a recommendation Item-Item space

2011-08-31 Thread Lance Norskog
"Also, if your original matrix is A, then it is usually a shorter path to results to analyze the word (item) cooccurrence matrix A'A. The methods below work either way." The cooccurrence definitions I'm finding only use the summation-based one in wikipedia. Are there any involving inverting the m

Re: Singular vectors of a recommendation Item-Item space

2011-08-29 Thread Ted Dunning
Jeff, I think that this is a much simpler exposition: http://tdunning.blogspot.com/2008/03/surprise-and-coincidence.html It makes the connection with entropy clear and allows a very simple implementation for more than 2x2 situations. More comments in-line: On Mon, Aug 29, 2011 at 1:34 PM, Jeff

Re: Singular vectors of a recommendation Item-Item space

2011-08-29 Thread Jeff Hansen
Friday I finally got around to reading Ted's paper "accurate methods for statistics of surprise and coincidence" for a better understanding of how to apply log likelihood. Can somebody validate if I'm understanding/applying the idea correctly in this case? If we have a item/feature matrix (docume

Re: Singular vectors of a recommendation Item-Item space

2011-08-26 Thread Lance Norskog
http://www.nytimes.com/interactive/2010/01/10/nyregion/20100110-netflix-map.html Do not fear demographics. Yes, some people rent movies with all-black casts, and other people rent movies with all-white casts. And the Walmarts in the SF East Bay have palettes full of Tyler Perry videos, while most

Re: Singular vectors of a recommendation Item-Item space

2011-08-26 Thread Ted Dunning
On Fri, Aug 26, 2011 at 8:29 AM, Jeff Hansen wrote: > Thanks for the math Ted -- that was very helpful. > NP. > ... I've been playing with smaller matrices > mainly for my own learning purposes -- it's much easier to read through 200 > movies (most of which I've heard of) and get a gut feel,

Re: Singular vectors of a recommendation Item-Item space

2011-08-26 Thread Jeff Hansen
Thanks for the math Ted -- that was very helpful. I've been using sparseMatrix() from libray(Matrix) -- largely based on your response to somebody elses email. I've been playing with smaller matrices mainly for my own learning purposes -- it's much easier to read through 200 movies (most of which

Re: Singular vectors of a recommendation Item-Item space

2011-08-26 Thread Lance Norskog
I got this "axis of interest" concept from a presentation by one of the Netflix team runner-ups, I don't know which one. He did not give a name for it. Is there a standard term? I hate just making up new words. Also, there are clusters of items at both ends, but there are also items along the axis

Re: Singular vectors of a recommendation Item-Item space

2011-08-26 Thread Sean Owen
That's correct. Well you just have to recompose the user row you are interested in. It will no longer be sparse, at all. Those new values are your estimated ratings. On Fri, Aug 26, 2011 at 12:07 AM, Jeff Hansen wrote: > > I also think I may have missed a big step of the puzzle. For some reason

Re: Singular vectors of a recommendation Item-Item space

2011-08-26 Thread Lance Norskog
This is a little meditation on user v.s. item matrix density. The heavy users and heavy items can be subsampled, once they are identified. Hadoop's built-in sort does give a very simple "map-increase" way to do this sort. http://ultrawhizbang.blogspot.com/2011/08/sorted-recommender-data.html On T

Re: Singular vectors of a recommendation Item-Item space

2011-08-25 Thread Ted Dunning
In matrix terms the binary user x item matrix maps a set of items to users (A h = users who interacted with items in h). Similarly A' maps users to items. Thus A' (A h) is the classic "users who x'ed this also x'ed that" sort of operation. This can be rearranged to be (A'A) h. This is where the

Re: Singular vectors of a recommendation Item-Item space

2011-08-25 Thread Jeff Hansen
One thing I found interesting (but not particularly surprising) is that the biggest singular value/vector was pretty much tied directly to volume. That makes sense because the best predictor of whether a given fields value was 1 was whether it belonged to a row with lots of 1s or a column with lot

Re: Singular vectors of a recommendation Item-Item space

2011-08-25 Thread Lance Norskog
If you take the item vector an existing user, multiply that by the left-hand SVD matrix, and multthe resulting vector[i] * 1/singularvalues[i], you should get the item's row in the left-hand column. So, the left-hand column times 1/singular values gives you the projection for a new user's item vect

Re: Singular vectors of a recommendation Item-Item space

2011-08-25 Thread Sean Owen
The 200x10 matrix is indeed a matrix of 10 singular vectors, which are eigenvectors of AA'. It's the columns, not rows, that are eigenvectors. The rows do mean something. I think it's fair to interpret the 10 singular values / vectors as corresponding to some underlying features of tastes. The row

Re: Singular vectors of a recommendation Item-Item space

2011-08-25 Thread Jeff Hansen
Well, I think my problem may have had more to do with what I was calling the eigenvector... I was referring to the rows rather than the columns of U and V. While the columns may be characteristic of the overall matrix, the rows are characteristic of the user or item (in that they are a rank reduc

Re: Singular vectors of a recommendation Item-Item space

2011-08-25 Thread Jake Mannix
On Thu, Aug 25, 2011 at 1:53 PM, Jeff Hansen wrote: > By the way, please ignore my use of the term eigenvector -- I have a > feeling > I completely misused it. I've never quite understood the concept, but to > me > that truncated 10 value long vector that corresponds to a movie seems to be > "ch

Re: Singular vectors of a recommendation Item-Item space

2011-08-25 Thread Jeff Hansen
By the way, please ignore my use of the term eigenvector -- I have a feeling I completely misused it. I've never quite understood the concept, but to me that truncated 10 value long vector that corresponds to a movie seems to be "characteristic" of it (which is what the language eigen was always i

Re: Singular vectors of a recommendation Item-Item space

2011-08-25 Thread Jeff Hansen
I've been playing around with this problem for the last week or so (or at least this problem as I understood it based on your initial commentary Lance) -- but purely in R using smaller data so I can 1. get my head wrapped around the problem, and 2. get more familiar with R. To make the problem a l

Re: Singular vectors of a recommendation Item-Item space

2011-08-17 Thread Lance Norskog
Sharpened: http://ultrawhizbang.blogspot.com/2011/08/singular-vectors-for-recommendations.html On Wed, Aug 10, 2011 at 11:53 PM, Sean Owen wrote: > You may need to sharpen your terms / problem statement here : > > What is a geometric value -- just mean a continuous real value? > So these are ite

Re: Singular vectors of a recommendation Item-Item space

2011-08-10 Thread Sean Owen
You may need to sharpen your terms / problem statement here : What is a geometric value -- just mean a continuous real value? So these are item-feature vectors? The middle bit of the output of an SVD is not a singular vector -- it's a diagonal matrix containing singular values on the diagonal. Th

Re: Singular vectors of a recommendation Item-Item space

2011-08-10 Thread Lance Norskog
A picture that might help explain the problem: http://www.flickr.com/photos/54866255@N00/6031564308/in/photostream On 8/10/11, Lance Norskog wrote: > Zeroing in on the topic: > > I have: > 1) a set of raw input vectors of a given length, one for each item. > Each value in the vectors are geomet

Re: Singular vectors of a recommendation Item-Item space

2011-08-10 Thread Lance Norskog
Zeroing in on the topic: I have: 1) a set of raw input vectors of a given length, one for each item. Each value in the vectors are geometric, not bag-of-words or other. The matrix is [# items , # dimensions]. 2) An SVD of same: left matrix of [ # items, #d features per item] * singular vector[

Re: Singular vectors of a recommendation Item-Item space

2011-07-11 Thread Lance Norskog
SVDRecommender is intriguing, thanks for the pointer. On Sun, Jul 10, 2011 at 12:15 PM, Ted Dunning wrote: > Also, item-item similarity is often (nearly) the result of a matrix product. >  If yours is, then you can decompose the user x item matrix and the desired > eigenvalues are the singular va

Re: Singular vectors of a recommendation Item-Item space

2011-07-10 Thread Ted Dunning
Also, item-item similarity is often (nearly) the result of a matrix product. If yours is, then you can decompose the user x item matrix and the desired eigenvalues are the singular values squared and the eigen vectors are the right singular vectors for the decomposition. On Sun, Jul 10, 2011 at 2

Re: Singular vectors of a recommendation Item-Item space

2011-07-10 Thread Sean Owen
So it sounds like you want the SVD of the item-item similarity matrix? Sure, you can use Mahout for that. If you are not in Hadoop land then look at SVDRecomnender to crib some related code. It is decomposing the user item matrix though. But for this special case of a symmetric matrix your singula

Singular vectors of a recommendation Item-Item space

2011-07-09 Thread Lance Norskog
I would like to find the singular vectors of an item-item data model. That is, the largest singular vector has many items "close" to it, and items at the ends are polar opposites in popularity. For example, the Netflix dataset yielded chick flicks v.s. Star Trek movies and Harry Potter v.s. (Stanle