Class BilinFunction

  • All Implemented Interfaces:
    edu.stanford.nlp.optimization.DiffFunction, edu.stanford.nlp.optimization.Function

    public class BilinFunction
    extends java.lang.Object
    implements edu.stanford.nlp.optimization.DiffFunction
    Wraps the NLL optimizing problem into the QNMinimizer optimizer.
    • Constructor Summary

      Constructors 
      Constructor Description
      BilinFunction​(java.util.Map<org.api4.java.ai.ml.ranking.dyad.dataset.IDyadRankingInstance,​java.util.Map<org.api4.java.ai.ml.ranking.dyad.dataset.IDyad,​org.api4.java.common.math.IVector>> featureTransforms, org.api4.java.ai.ml.ranking.dyad.dataset.IDyadRankingDataset drDataset, int dimension)
      Creates a NLL optimizing problem for the kronecker product as the bilinear feature transform.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double[] derivativeAt​(double[] x)  
      int domainDimension()  
      double valueAt​(double[] x)  
      • Methods inherited from class java.lang.Object

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

      • BilinFunction

        public BilinFunction​(java.util.Map<org.api4.java.ai.ml.ranking.dyad.dataset.IDyadRankingInstance,​java.util.Map<org.api4.java.ai.ml.ranking.dyad.dataset.IDyad,​org.api4.java.common.math.IVector>> featureTransforms,
                             org.api4.java.ai.ml.ranking.dyad.dataset.IDyadRankingDataset drDataset,
                             int dimension)
        Creates a NLL optimizing problem for the kronecker product as the bilinear feature transform.
        Parameters:
        featureTransform - the feature transform, must be an instance of BiliniearFeatureTransform
        drDataset - the dataset to optimize
        dimension - the dimension of the optimized vector
    • Method Detail

      • valueAt

        public double valueAt​(double[] x)
        Specified by:
        valueAt in interface edu.stanford.nlp.optimization.Function
      • domainDimension

        public int domainDimension()
        Specified by:
        domainDimension in interface edu.stanford.nlp.optimization.Function
      • derivativeAt

        public double[] derivativeAt​(double[] x)
        Specified by:
        derivativeAt in interface edu.stanford.nlp.optimization.DiffFunction