You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Petrelli <zh...@gmail.com> on 2012/08/02 06:07:26 UTC

What will be the input to mahout SVD ?

Hi ,

I use the mahout  to implment SVD. 
The original input is like this :
1       2       1
1       3       1
1       4       1
2       6       1
2       9       1
3       2       1
3       8       1
4       7       1
4       9       1
5       1       1
5       6       1
6       1       1
6       2       1
6       3       1
6       4       1
6       5       1
6       6       1
6       7       1
6       8       1
6       9       1
7       1       1
7       3       1
8       7       1
8       9       1
9       6       2
9       9       1
10      1       1
10      3       1
10      8       1
11      4       1
11      5       1

Then I transformed the input to SequenceFile as $MAHOUT_HOME/bin/mahout
seqdirectory -i /user/zhangzhe/data1/ALS/check.csv -o 
/user/zhangzhe/data1/ALS/check_test  -c UTF-8.

And I ran the command $MAHOUT_HOME/bin/mahout svd --input
/user/zhangzhe/data1/ALS/check_test/chunk-0 --output
/user/zhangzhe/data1/ALS/output -nr 11 -nc 9  --tempDir
/user/zhangzhe/data1/ALS/als/tmp -r 3
But I got following errors:

12/07/27 10:27:33 INFO common.AbstractJob: Command line arguments:
{--endPhase=[2147483647], --inMemory=[false],
--input=[/user/zhangzhe/data1/ALS/check_test/chunk-0], --maxError=[0.05],
--minEigenvalue=[0.0], --numCols=[9], --numRows=[11],
--output=[/user/zhangzhe/data1/ALS/output], --rank=[3], --startPhase=[0],
--tempDir=[/user/zhangzhe/data1/ALS/als/tmp]}
12/07/27 10:27:33 INFO lanczos.LanczosSolver: Finding 3 singular vectors of
matrix with 11 rows, via Lanczos
12/07/27 10:27:36 INFO mapred.FileInputFormat: Total input paths to process
: 1
12/07/27 10:27:36 INFO mapred.JobClient: Running job: job_201207231017_0349
12/07/27 10:27:37 INFO mapred.JobClient:  map 0% reduce 0%
12/07/27 10:27:56 INFO mapred.JobClient: Task Id :
attempt_201207231017_0349_m_000000_0, Status : FAILED
java.lang.ClassCastException: org.apache.hadoop.io.Text cannot be cast to
org.apache.mahout.math.VectorWritable
        at
org.apache.mahout.math.hadoop.TimesSquaredJob$TimesSquaredMapper.map(TimesSquaredJob.java:196)
        at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:436)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:372)
        at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:396)
        at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1093)
        at org.apache.hadoop.mapred.Child.main(Child.java:249)

12/07/27 10:27:56 WARN mapred.JobClient: Error reading task outputslave3
12/07/27 10:27:56 WARN mapred.JobClient: Error reading task outputslave3
12/07/27 10:28:08 INFO mapred.JobClient: Task Id :
attempt_201207231017_0349_m_000000_1, Status : FAILED
java.lang.ClassCastException: org.apache.hadoop.io.Text cannot be cast to
org.apache.mahout.math.VectorWritable
        at
org.apache.mahout.math.hadoop.TimesSquaredJob$TimesSquaredMapper.map(TimesSquaredJob.java:196)
        at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:436)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:372)
        at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:396)
        at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1093)
        at org.apache.hadoop.mapred.Child.main(Child.java:249)

What will be the input  to mahout SVD ? 



--
View this message in context: http://lucene.472066.n3.nabble.com/What-will-be-the-input-to-mahout-SVD-tp3998699.html
Sent from the Mahout User List mailing list archive at Nabble.com.