@Test public void testCPU() { System.out.println("CPU"); MathEx.setSeed(19650218); LinearModel model = LASSO.fit(CPU.formula, CPU.data, 0.1); System.out.println(model); double[] prediction = CrossValidation.regression(10, CPU.formula, CPU.data, (f, x) -> LASSO.fit(f, x, 0.1)); double rmse = RMSE.of(CPU.y, prediction); System.out.println("10-CV RMSE = " + rmse); assertEquals(55.27298388642968, rmse, 1E-4); }
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);  }