mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Bellasio <stefanobella...@gmail.com>
Subject Creating a Sparse Matrix to use with SVD
Date Fri, 12 Nov 2010 08:55:36 GMT
HHi guys, i'm new with Mahout and Hadoop. I tried something and right now i did some tests
with recommendation (based on grouplens dataset) with Mahout and with Hadoop; i'm trying to
figure out how i can use SVD for recommendations (Lanczos solver distributed with Hadoop),
and i know that i need a matrix to start. So i coded something in Java using SparseDoubleMatrix2D
(in the math dir of mahout) but i'm not sure of what i have to do. 

My code: 
package org.apache.mahout.math.matrix.impl; 

import org.apache.mahout.math.function.BinaryFunction; 

public class creaMatrice extends SparseDoubleMatrix2D { 

       public static void main(String args[]){ 
       double array[][]= { {1,2,4,8}, {5,0,4,5}, {2,9,1,5} }; 
       SparseDoubleMatrix2D matrice = new SparseDoubleMatrix2D(array); 
       int prova = matrice.getQuick(2,3); 

       System.out.println(prova); 

} 
} 

It's just to try if something works and the answer is "no" for now :) But firstly i have some
questions about SVD, matrix and hadoop. 

1) i need to create a matrix with item-ratings and then convert it with SVD application of
mahout? 
2) is there a guide or something else that can explain this? 

Thank you for your support, hope to see some helpful answer :) Stefano        
Mime
View raw message