()
| 40 | } |
| 41 | |
| 42 | public void testGH2() { |
| 43 | final double[][] dat = { |
| 44 | /// x1 x2 y |
| 45 | { 1, 0, 1 }, |
| 46 | { 1, 1, 1 }, |
| 47 | { 0, 1, 0 } |
| 48 | }; |
| 49 | final RExample ex = new RExample(dat); |
| 50 | final VectorFn sl = new DataFn<ExampleRow>(new SigmoidLossMultinomial(ex.dim,2),ex); |
| 51 | final double[] x0 = new double[sl.dim()]; |
| 52 | x0[1] = 1.0; |
| 53 | TestOpt.testGradAndHessian(sl,x0,1.0e-5,1.0e-4); // very sensitive to epsilon |
| 54 | } |
| 55 | |
| 56 | public void testGHR2() { |
| 57 | final double[][] dat = { |
nothing calls this directly
no test coverage detected