Class EvaluatePrediction

    • Field Detail

      • m_AddMisclassification

        protected boolean m_AddMisclassification
        whether to add misclassification information.
    • Constructor Detail

      • EvaluatePrediction

        public EvaluatePrediction()
    • Method Detail

      • setAddMisclassification

        public void setAddMisclassification​(boolean value)
        Sets whether to add the misclassification information.
        Parameters:
        value - true if to add
      • getAddMisclassification

        public boolean getAddMisclassification()
        Returns whether to add the misclassification information.
        Returns:
        true if to add
      • addMisclassificationTipText

        public String addMisclassificationTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • compare

        protected Map<String,​Integer> compare​(int[] predPixels,
                                                    int[] annoPixels)
        Compares the two pixel arrays.
        Parameters:
        predPixels - the prediction pixels
        annoPixels - the annotation pixels
        Returns:
        the statistics
      • calcMisclassified

        protected com.github.fracpete.javautils.struct.Struct2<Integer,​Double> calcMisclassified​(int[] predPixels,
                                                                                                       int[] annoOtherPixels)
        Calculates the misclassification count/percentage. Percentage is calculated as: miscl_pixel_count / total_pixel_count_other_label
        Parameters:
        predPixels - the prediction pixels
        annoOtherPixels - the annotation pixels from another layer
        Returns:
        the misclassified pixel count and percentage