Class PredictionHelper


  • public class PredictionHelper
    extends Object
    Helper class for predictions.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • PredictionHelper

        public PredictionHelper()
    • Method Detail

      • filterMissing

        public static double[][] filterMissing​(double[] actual,
                                               double[] predicted)
        Filters out missing actual values/predicted values.
        Parameters:
        actual - the actual values
        predicted - the predicted values
        Returns:
        actual (index 0), predicted (index 1)
      • filterMissing

        public static Object[] filterMissing​(String[] actual,
                                             String[] predicted,
                                             double[] prob)
        Filters out missing actual values/predicted values.
        Parameters:
        actual - the actual values
        predicted - the predicted values
        prob - the probabilities, can be null
        Returns:
        actual (index 0), predicted (index 1), probabilities (index 2)