Package org.api4.java.ai.ml.ranking
Interface IRanking<O>
-
- Type Parameters:
O- The type of objects which is ranked.
- All Superinterfaces:
java.util.Collection<O>,IPrediction,java.lang.Iterable<O>,java.util.List<O>
public interface IRanking<O> extends java.util.List<O>, IPrediction
A ranking is a function mapping assigning each object of a set of objects a rank, i.e. a number between 1 and the total number of objects. For convenience, we assume the ranking to be stored in a list. On top of this, we define ranking specific methods to ease the handling of rankings and access ranking-specific information directly.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default OgetObjectForRank(int rank)Retrieves the object for the given rank from this ranking.default intgetRankOfObject(O object)Retrieves the rank for the given object from this ranking.-
Methods inherited from interface org.api4.java.ai.ml.core.evaluation.IPrediction
getClassConfidence, getClassDistribution, getLabelWithHighestProbability, getPrediction, getProbabilityOfLabel
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Method Detail
-
getRankOfObject
default int getRankOfObject(O object)
Retrieves the rank for the given object from this ranking.- Parameters:
object- The object to retrieve the rank for.- Returns:
- The rank of the requested object.
-
getObjectForRank
default O getObjectForRank(int rank)
Retrieves the object for the given rank from this ranking.- Parameters:
rank- The rank to retrieve the object for.- Returns:
- The object with the requested rank.
-
-