@Test public void testDomainDimensionSanity() throws IOException { RealValueFileEventStream rvfes1 = new RealValueFileEventStream( "src/test/resources/data/opennlp/maxent/real-valued-weights-training-data.txt", StandardCharsets.UTF_8.name()); testDataIndexer.index(rvfes1); NegLogLikelihood objectFunction = new NegLogLikelihood(testDataIndexer); int correctDomainDimension = testDataIndexer.getPredLabels().length * testDataIndexer.getOutcomeLabels().length; Assert.assertEquals(correctDomainDimension, objectFunction.getDimension()); }
public int getDimension() { return this.dimension; }
NegLogLikelihood implements Function { public int getDimension() { return this.dimension; } }
NegLogLikelihood implements Function { public int getDimension() { return this.dimension; } NegLogLikelihood(DataIndexer indexer); }
NegLogLikelihood implements Function { public int getDimension() { return this.dimension; } NegLogLikelihood(DataIndexer indexer); int getDimension(); double[] getInitialPoint(); double valueAt(double[] x); double[] gradientAt(double[] x); }
NegLogLikelihood implements Function { public int getDimension() { return this.dimension; } NegLogLikelihood(DataIndexer indexer); int getDimension(); double[] getInitialPoint(); double valueAt(double[] x); double[] gradientAt(double[] x);  }