public static LinearModel fit(Formula formula, DataFrame data) {
        return fit(formula, data, new Properties());
    }
@Test
    public void testToy() {
        double[][] A = {
            {1, 0, 0, 0.5},
            {0, 1, 0.2, 0.3},
            {1, 0.5, 0.2, 0.3},
            {0, 0.1, 0, 0.2},
            {0, 0.1, 1, 0.2}
        };
        
        double[] y = {6, 5.2, 6.2, 5, 6};

        DataFrame df = DataFrame.of(A).merge(DoubleVector.of("y", y));
        RegressionValidation<LinearModel> result = RegressionValidation.of(Formula.lhs("y"), df, df,
                (formula, data) -> LASSO.fit(formula, data, 0.1, 0.001, 500));

        System.out.println(result.model);
        System.out.println(result);
        
        assertEquals(5.0259443688265355, result.model.intercept(), 1E-7);
        double[] w = {0.9659945126777854, -3.7147706312985876E-4, 0.9553629503697613, 9.416740009376934E-4};
        for (int i = 0; i < w.length; i++) {
            assertEquals(w[i], result.model.coefficients()[i], 1E-5);
        }
    }