Class DyadRankingMLLossFunctionWrapper
- java.lang.Object
-
- ai.libs.jaicore.ml.dyadranking.loss.DyadRankingMLLossFunctionWrapper
-
- All Implemented Interfaces:
DyadRankingLossFunction
public class DyadRankingMLLossFunctionWrapper extends java.lang.Object implements DyadRankingLossFunction
A wrapper for dyad ranking loss that enables already implemented multi label classification loss functions to be used in this context.
-
-
Constructor Summary
Constructors Constructor Description DyadRankingMLLossFunctionWrapper(ADecomposableDoubleMeasure<double[]> measure)Constructs a new loss function wrapper that uses the given measure to compute the loss between a correct and predicted dyad ranking.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleloss(IDyadRankingInstance actual, IDyadRankingInstance predicted)Computes the loss between the actual dyad ordering and predicted dyad ordering, represented by dyad ranking instances.
-
-
-
Constructor Detail
-
DyadRankingMLLossFunctionWrapper
public DyadRankingMLLossFunctionWrapper(ADecomposableDoubleMeasure<double[]> measure)
Constructs a new loss function wrapper that uses the given measure to compute the loss between a correct and predicted dyad ranking.- Parameters:
measure- the measure to use
-
-
Method Detail
-
loss
public double loss(IDyadRankingInstance actual, IDyadRankingInstance predicted)
Description copied from interface:DyadRankingLossFunctionComputes the loss between the actual dyad ordering and predicted dyad ordering, represented by dyad ranking instances.- Specified by:
lossin interfaceDyadRankingLossFunction- Parameters:
actual- the correct orderingpredicted- the predicted ordering- Returns:
- the loss between the predicted and correct ordering, depending on the implementation
-
-