Class NDCGLoss
- java.lang.Object
-
- ai.libs.jaicore.ml.dyadranking.loss.NDCGLoss
-
- All Implemented Interfaces:
DyadRankingLossFunction
public class NDCGLoss extends java.lang.Object implements DyadRankingLossFunction
The Normalized Discounted Cumulative Gain for ranking.
-
-
Constructor Summary
Constructors Constructor Description NDCGLoss(int l)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetL()doubleloss(IDyadRankingInstance actual, IDyadRankingInstance predicted)Computes the loss between the actual dyad ordering and predicted dyad ordering, represented by dyad ranking instances.voidsetL(int l)
-
-
-
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
-
getL
public int getL()
-
setL
public void setL(int l)
-
-