Interface IPredictionAndGroundTruthTable<E,A>
-
- All Known Subinterfaces:
IRankingPredictionAndGroundTruthTable,IRegressionPredictionAndGroundTruthTable
public interface IPredictionAndGroundTruthTable<E,A>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <E1,A1>
IPredictionAndGroundTruthTable<E1,A1>getCastedView(java.lang.Class<E1> expectedClass, java.lang.Class<A1> predictionClass)In general, the processes that create a prediction by executing a learner do not know (and do not need to know) the concrete type of true labels and predictions over those.EgetGroundTruth(int instance)E[]getGroundTruthAsArray()java.util.List<E>getGroundTruthAsList()AgetPrediction(int instance)A[]getPredictionsAsArray()java.util.List<A>getPredictionsAsList()intsize()
-
-
-
Method Detail
-
getCastedView
<E1,A1> IPredictionAndGroundTruthTable<E1,A1> getCastedView(java.lang.Class<E1> expectedClass, java.lang.Class<A1> predictionClass)
In general, the processes that create a prediction by executing a learner do not know (and do not need to know) the concrete type of true labels and predictions over those. However, loss functions that work with those ground truths and predictions normally are not defined over objects but rather concrete classes. To turn an non-matching or un-specific prediction table into a concrete one that serves in the context of performance computation, the table should be castable (cheaply, i.e., without recomputing the whole gt/prediction array).- Type Parameters:
E1- The type of ground truth labelsA1- The type of predictions of labels- Parameters:
expectedClass-predictionClass-- Returns:
-
size
int size()
-
getPrediction
A getPrediction(int instance)
-
getGroundTruth
E getGroundTruth(int instance)
-
getPredictionsAsList
java.util.List<A> getPredictionsAsList()
-
getPredictionsAsArray
A[] getPredictionsAsArray()
-
getGroundTruthAsList
java.util.List<E> getGroundTruthAsList()
-
getGroundTruthAsArray
E[] getGroundTruthAsArray()
-
-