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

Method testGH2

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

dimMethod · 0.95
testGradAndHessianMethod · 0.95

Tested by

no test coverage detected