public static LinearModel fit(Formula formula, DataFrame data) {
        return fit(formula, data, new Properties());
    }
@Test
    public void testLongley() throws Exception {
        System.out.println("longley");
        LinearModel model = RidgeRegression.fit(Longley.formula, Longley.data, 0.1);
        System.out.println(model);

        assertEquals(-1.354007e+03, model.intercept(), 1E-3);
        assertEquals(5.457700e-02, model.coefficients()[0], 1E-7);
        assertEquals(1.198440e-02, model.coefficients()[1], 1E-7);
        assertEquals(1.261978e-02, model.coefficients()[2], 1E-7);
        assertEquals(-1.856041e-01, model.coefficients()[3], 1E-7);
        assertEquals(7.218054e-01, model.coefficients()[4], 1E-7);
        assertEquals(5.884884e-01, model.coefficients()[5], 1E-7);

        RegressionMetrics metrics = LOOCV.regression(Longley.formula, Longley.data,
                (f, x) -> RidgeRegression.fit(f, x, 0.1));

        System.out.println(metrics);
        assertEquals(1.7288188, metrics.rmse, 1E-7);

        java.nio.file.Path temp = Write.object(model);
        Read.object(temp);
    }