Class DyadRankingFeatureTransformNegativeLogLikelihood
- java.lang.Object
-
- ai.libs.jaicore.ml.ranking.dyad.learner.optimizing.DyadRankingFeatureTransformNegativeLogLikelihood
-
- All Implemented Interfaces:
ai.libs.jaicore.math.gradientdescent.IGradientDescendableFunction
,IDyadRankingFeatureTransformPLGradientDescendableFunction
public class DyadRankingFeatureTransformNegativeLogLikelihood extends java.lang.Object implements IDyadRankingFeatureTransformPLGradientDescendableFunction
Implements the negative log-likelihood function for the feature transformation Placket-Luce dyad ranker. In particular, this implmentation is the NLL of [1] (we adhere their notation here). This NLL is a convex function, which we can optimize using anIOptimizationAlgorithm
, together with theDyadRankingFeatureTransformNegativeLogLikelihoodDerivative
. [1] Schäfer, D. & Hüllermeier, Dyad ranking using Plackett–Luce models based on joint feature representations, https://link.springer.com/article/10.1007%2Fs10994-017-5694-9
-
-
Constructor Summary
Constructors Constructor Description DyadRankingFeatureTransformNegativeLogLikelihood()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
apply(org.api4.java.common.math.IVector w)
Algorithm (18) of [1].void
initialize(org.api4.java.ai.ml.ranking.dyad.dataset.IDyadRankingDataset dataset, 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)
Initializes the function with the given dataset.
-
-
-
Method Detail
-
initialize
public void initialize(org.api4.java.ai.ml.ranking.dyad.dataset.IDyadRankingDataset dataset, 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)
Description copied from interface:IDyadRankingFeatureTransformPLGradientDescendableFunction
Initializes the function with the given dataset.- Specified by:
initialize
in interfaceIDyadRankingFeatureTransformPLGradientDescendableFunction
- Parameters:
dataset
- the dataset to usefeatureTransforms
- the feature precomputed feature transforms
-
apply
public double apply(org.api4.java.common.math.IVector w)
Algorithm (18) of [1]. We adhere their notations, but, unify the sums.- Specified by:
apply
in interfaceai.libs.jaicore.math.gradientdescent.IGradientDescendableFunction
-
-