Class ConfusionMatrix

    • Field Detail

      • m_Labels

        protected BaseString[] m_Labels
        the label to use instead of automatically determining.
      • m_ActualPrefix

        protected String m_ActualPrefix
        the optional prefix for the actual labels.
      • m_PredictedPrefix

        protected String m_PredictedPrefix
        the optional prefix for the predicted labels.
    • Constructor Detail

      • ConfusionMatrix

        public ConfusionMatrix()
    • Method Detail

      • setLabels

        public void setLabels​(BaseString[] value)
        Sets the labels to use for enforcing order other than alphabetical.
        Parameters:
        value - the labels
      • getLabels

        public BaseString[] getLabels()
        Returns the labels to use for enforcing order other than alphabetical.
        Returns:
        the labels
      • labelsTipText

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

        public void setActualPrefix​(String value)
        Sets the prefix of the actual labels.
        Parameters:
        value - the prefix
      • getActualPrefix

        public String getActualPrefix()
        Returns the prefix of the actual labels.
        Returns:
        the prefix
      • actualPrefixTipText

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

        public void setPredictedPrefix​(String value)
        Sets the prefix of the predicted labels.
        Parameters:
        value - the prefix
      • getPredictedPrefix

        public String getPredictedPrefix()
        Returns the prefix of the predicted labels.
        Returns:
        the prefix
      • predictedPrefixTipText

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

        public void setMatrixValues​(ConfusionMatrix.MatrixValues value)
        Sets the type of values to generate.
        Parameters:
        value - the type of values
      • getMatrixValues

        public ConfusionMatrix.MatrixValues getMatrixValues()
        Returns the type of values to generate.
        Returns:
        the type of values
      • matrixValuesTipText

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

        protected void collapse​(Map<String,​BufferedImage> layers,
                                List<String> labels,
                                int[] collapsed)
        Collapses the layers into a single array, with the label index corresponding to the integer value (label 0 = pixel 1, label 1 = pixel 2, ...).
        Parameters:
        layers - the layers to collapse
        labels - the labels to collapse
        collapsed - the collapsed array to fill
      • convert

        protected Object convert​(double value)
        Converts the number to integer if COUNTS is used.
        Parameters:
        value - the value to convert
        Returns:
        the converted value