@Test(expected = Test.None.class) public void testLongley() throws Exception { System.out.println("longley"); LinearModel model = LASSO.fit(Longley.formula, Longley.data, 0.1); System.out.println(model); double[] prediction = LOOCV.regression(Longley.formula, Longley.data, (f, x) -> LASSO.fit(f, x, 0.1)); double rmse = RMSE.of(Longley.y, prediction); System.out.println("LOOCV RMSE = " + rmse); assertEquals(1.4146564289679233, rmse, 1E-4); java.nio.file.Path temp = smile.data.Serialize.write(model); smile.data.Serialize.read(temp); }
public static LinearModel fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); }
LASSO { public static LinearModel fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); } }
LASSO { public static LinearModel fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); }  }
LASSO { public static LinearModel fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); }  static LinearModel fit(Formula formula, DataFrame data); static LinearModel fit(Formula formula, DataFrame data, Properties prop); static LinearModel fit(Formula formula, DataFrame data, double lambda); static LinearModel fit(Formula formula, DataFrame data, double lambda, double tol, int maxIter); }
LASSO { public static LinearModel fit(Formula formula, DataFrame data) { return fit(formula, data, new Properties()); }  static LinearModel fit(Formula formula, DataFrame data); static LinearModel fit(Formula formula, DataFrame data, Properties prop); static LinearModel fit(Formula formula, DataFrame data, double lambda); static LinearModel fit(Formula formula, DataFrame data, double lambda, double tol, int maxIter);  }