public double[][] test(DataFrame data) {
        DataFrame x = formula.x(data);

        int n = x.nrow();
        int ntrees = trees.length;
        double[][] prediction = new double[ntrees][n];

        for (int j = 0; j < n; j++) {
            Tuple xj = x.get(j);
            double base = b;
            for (int i = 0; i < ntrees; i++) {
                base += shrinkage * trees[i].predict(xj);
                prediction[i][j] = base;
            }
        }

        return prediction;
    }
@Test
    public void testCpuLAD() {
        test(Loss.lad(), "CPU", CPU.formula, CPU.data, 66.0549);
    }