MCPcopy Create free account
hub / github.com/WinVector/Logistic / testGH

Method testGH

test/com/winvector/logistic/TestLog1.java:16–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 = {

Callers

nothing calls this directly

Calls 2

dimMethod · 0.95
testGradAndHessianMethod · 0.95

Tested by

no test coverage detected