()
| 14 | |
| 15 | |
| 16 | public void testGH() { |
| 17 | final double[][] dat = { |
| 18 | /// x1 x2 y |
| 19 | { 1, 0, 1 }, |
| 20 | { 1, 1, 1 }, |
| 21 | { 0, 1, 0 } |
| 22 | }; |
| 23 | final RExample ex = new RExample(dat); |
| 24 | final VectorFn sl = new DataFn<ExampleRow>(new SigmoidLossMultinomial(ex.dim,2),ex); |
| 25 | final double[] x0 = new double[sl.dim()]; |
| 26 | TestOpt.testGradAndHessian(sl,x0,1.0e-5,1.0e-4); // very sensitive to epsilon |
| 27 | } |
| 28 | |
| 29 | public void testGHR() { |
| 30 | final double[][] dat = { |
nothing calls this directly
no test coverage detected