()
| 27 | } |
| 28 | |
| 29 | public void testGHR() { |
| 30 | final double[][] dat = { |
| 31 | /// x1 x2 y |
| 32 | { 1, 0, 1 }, |
| 33 | { 1, 1, 1 }, |
| 34 | { 0, 1, 0 } |
| 35 | }; |
| 36 | final RExample ex = new RExample(dat); |
| 37 | final VectorFn sl = NormPenalty.addPenalty(new DataFn<ExampleRow>(new SigmoidLossMultinomial(ex.dim,2),ex),0.1,null); |
| 38 | final double[] x0 = new double[sl.dim()]; |
| 39 | TestOpt.testGradAndHessian(sl,x0,1.0e-5,1.0e-4); // very sensitive to epsilon |
| 40 | } |
| 41 | |
| 42 | public void testGH2() { |
| 43 | final double[][] dat = { |
nothing calls this directly
no test coverage detected