Mahout version: 0.7,hadoop version: 1.0.4,jdk:1.7.0_25 64bit.
This chapter begins the series SVD, namely descending dimension. This can be directly run in the Mahout mahout_home/mahout/svd-h to see the algorithm call parameters, or in the official website of the corresponding page can also be seen, the actual use of the SVD call parameters are as follows:
Package MAHOUT.FANSY.SVD;
Import Org.apache.mahout.math.hadoop.decomposer.DistributedLanczosSolver;
public class Runsvd {
/**
* calls SVD algorithm
* @throws Exception
/public static void Main (string[) args) thr oWS Exception {
string[] arg=new string[]{"-jt", "ubuntu:9001", "-fs", "ubuntu:9000",
"I", "Hdfs://ubuntu : 9000/svd/input/wind ",
"-O "," Hdfs://ubuntu:9000/svd/output ",
"-nr "," 178 ","-nc ",", ","
R "," 3 ",
"-sym", "Square",
"--CLEANSVD", "true",
"--tempdir", "Hdfs://ubuntu:9000/svd/temp"
};
Distributedlanczossolver.main (ARG);
}
}
Before running this algorithm, you need to convert the input data, such as using the following input data:
Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/extra/