Class ConditionalLikelihoodCostFunction

  • All Implemented Interfaces:
    CostFunction

    public final class ConditionalLikelihoodCostFunction
    extends java.lang.Object
    implements CostFunction
    Conditional likelihood cost function, used in a maximum entropy markov model to optimize the weights.
    Author:
    thomas.jungblut
    • Constructor Summary

      Constructors 
      Constructor Description
      ConditionalLikelihoodCostFunction​(de.jungblut.math.DoubleMatrix features, de.jungblut.math.DoubleMatrix outcome)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CostGradientTuple evaluateCost​(de.jungblut.math.DoubleVector input)
      Evaluation for the cost function to retrieve cost and gradient.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConditionalLikelihoodCostFunction

        public ConditionalLikelihoodCostFunction​(de.jungblut.math.DoubleMatrix features,
                                                 de.jungblut.math.DoubleMatrix outcome)
    • Method Detail

      • evaluateCost

        public CostGradientTuple evaluateCost​(de.jungblut.math.DoubleVector input)
        Description copied from interface: CostFunction
        Evaluation for the cost function to retrieve cost and gradient.
        Specified by:
        evaluateCost in interface CostFunction
        Parameters:
        input - a given input vector
        Returns:
        a tuple consists of J (cost) and a vector X which is the gradient of the input.