/** * Combine bias data from small files to a integrated file * * @param conf * @param pathName * @param outName * @throws IOException */ public static void extractBias(Configuration conf, String pathName, String outName, int n) throws IOException { List<String> resList = DataOperators.readTextFromHDFS(conf, pathName); DenseDoubleMatrix1D vBias = new DenseDoubleMatrix1D(n); for (String line : resList) { String[] items = line.split("\t"); vBias.set(Integer.parseInt(items[0]), Double.parseDouble(items[1])); } MatrixIO.saveDenseMatrix1D2HDFS(conf, outName, vBias, true); }