edu.stanford.nlp.classify
Class AdaptedGaussianPriorObjectiveFunction
java.lang.Object
edu.stanford.nlp.optimization.AbstractCachingDiffFunction
edu.stanford.nlp.optimization.AbstractStochasticCachingDiffFunction
edu.stanford.nlp.classify.LogConditionalObjectiveFunction
edu.stanford.nlp.classify.AdaptedGaussianPriorObjectiveFunction
- All Implemented Interfaces:
- DiffFunction, Function, HasInitial
public class AdaptedGaussianPriorObjectiveFunction
- extends LogConditionalObjectiveFunction
Adapt the mean of the Gaussian Prior by shifting the mean to the previously trained weights
- Author:
- Pi-Chuan Chang
Fields inherited from class edu.stanford.nlp.classify.LogConditionalObjectiveFunction |
data, dataweights, derivativeAD, derivativeNumerator, labels, numClasses, numFeatures, prior, priorDerivative, probs, sums, useSummedConditionalLikelihood, values, xAD |
Fields inherited from class edu.stanford.nlp.optimization.AbstractStochasticCachingDiffFunction |
allIndices, curElement, extFiniteDiffDerivative, finiteDifferenceStepSize, gradPerturbed, hasNewVals, HdotV, lastBatch, lastBatchSize, lastElement, lastVBatch, lastXBatch, method, randGenerator, recalculatePrevBatch, returnPreviousValues, sampleMethod, xPerturbed |
Method Summary |
protected void |
calculate(double[] x)
Calculate the conditional likelihood. |
protected void |
rvfcalculate(double[] x)
Calculate conditional likelihood for datasets with real-valued features. |
double[] |
to1D(double[][] x2)
|
Methods inherited from class edu.stanford.nlp.optimization.AbstractStochasticCachingDiffFunction |
clearCache, copy, decrementBatch, derivativeAt, derivativeAt, HdotVAt, HdotVAt, HdotVAt, incrementBatch, initial, lastValue, setValue, valueAt, valueAt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdaptedGaussianPriorObjectiveFunction
public AdaptedGaussianPriorObjectiveFunction(GeneralDataset dataset,
LogPrior prior,
double[][] weights)
calculate
protected void calculate(double[] x)
- Calculate the conditional likelihood.
- Overrides:
calculate
in class LogConditionalObjectiveFunction
rvfcalculate
protected void rvfcalculate(double[] x)
- Description copied from class:
LogConditionalObjectiveFunction
- Calculate conditional likelihood for datasets with real-valued features.
Currently this can calculate CL only (no support for SCL).
TODO: sum-conditional obj. fun. with RVFs.
- Overrides:
rvfcalculate
in class LogConditionalObjectiveFunction
- Parameters:
x
-
to1D
public double[] to1D(double[][] x2)
Stanford NLP Group