public static RandomProjection sparse(int n, int p, String... columns) {
        if (n < 2) {
            throw new IllegalArgumentException("Invalid dimension of input space: " + n);
        }

        if (p < 1 || p > n) {
            throw new IllegalArgumentException("Invalid dimension of feature space: " + p);
        }

        Matrix projection = new Matrix(p, n);
        double scale = Math.sqrt(3);
        for (int i = 0; i < p; i++) {
            for (int j = 0; j < n; j++) {
                projection.set(i, j, scale * (MathEx.random(prob) - 1));
            }
        }
        return new RandomProjection(projection, columns);
    }
@Test
    public void testSparseRandomProjection() {
        System.out.println("sparse random projection");
        RandomProjection instance = RandomProjection.sparse(128, 40);

        Matrix p = instance.projection;
        System.out.println(p.toString(true));
    }