double lambda = 0.01;
Vector ratings = new DenseVector(new double[] { 2, 1 });
Vector col1 = new DenseVector(new double[] { 1, 2 });
Vector col2 = new DenseVector(new double[] { 3, 4 });
Vector result = solver.solve(Arrays.asList(col1, col2), ratings, lambda, numFeatures);
Vector.Element[] elems = new Vector.Element[result.size()];
for (int n = 0; n < result.size(); n++) {
elems[n] = result.getElement(n);
}