Interface IPredictionAndGroundTruthTable<E,​A>

    • 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 labels
        A1 - 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()