Tensor Factorization Example
Tensor Factorization Example
in Recommendation Systems
Factorization Model
We approximate X as the product of two rank-1 matrices A and
B:
○X≈A·B
○ Where A is 2×1 and B is 1×2.
Formulating Entry Equations
● Each entry Xij = ai * bj gives us:
○ a1*b1 = 2
○ a1*b2 = 3
○ a2*b1 = 6
○ a2*b2 = 9
Deriving Relationships
● From dividing equations, we find:
○ b2/b1 = 3/2 → b2 = 1.5 · b1
○ a2/a1 = (6/b1)/(2/b1) = 3 → a2 = 3 · a1
○ This shows a scaling ambiguity: (A, B) and (cA, B/c)
are both solutions.
○ Scaling Ambiguity means that in matrix or tensor
factorization, the individual factors can be rescaled
without changing the overall product, making the
factorization not uniquely determined.
Fixing Parameters
● To get a unique solution, set a1 = 1:
○ a1 = 1
○ b1 = 2 / a1 = 2
○ b2 = 1.5 · b1 = 3
○ a2 = 3 · a1 = 3
Final Factor Matrices
● The rank-1 factorization yields:
○ A = [[1]
[3]]
○ B = [[2, 3]]
○ Verification: A · B = X
Tensor Factorization in Recommendation
∘ Outer Product:
The outer product of three vectors gives a rank-1
tensor (like a small block of data).
Why Rank-1 Factorization?
• Simplifies data into low-rank structures
• Reveals latent relationships
• Basis for recommender systems
• Handling scaling ambiguity ensures interpretability
Challenges
● High computational cost