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

Method testGHR

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

addPenaltyMethod · 0.95
dimMethod · 0.95
testGradAndHessianMethod · 0.95

Tested by

no test coverage detected