Class MultiLabelPrediction

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getVote​(int outputAttributeIndex, int classIndex)
      The vote assigned to a class of an output attribute
      double[] getVotes()
      The votes for the first output attribute
      double[] getVotes​(int outputAttributeIndex)
      The votes for a given output attribute
      boolean hasVotesForAttribute​(int outputAttributeIndex)
      Checks if there are votes for a given output attribute
      int numClasses​(int outputAttributeIndex)
      Different output attributes may have different number of classes.
      int numOutputAttributes()
      Number of output attributes.
      void setVote​(int outputAttributeIndex, int classIndex, double vote)
      Sets the vote for class of a given output attribute
      void setVotes​(double[] votes)
      Sets the votes for the first output attribute
      void setVotes​(int outputAttributeIndex, double[] votes)
      Sets the votes for a given output attribute
      int size()
      The size of the prediction, that is the number of output attributes
      String toString()
      The text of the prediction, that is the description of the values of the prediction
    • Constructor Detail

      • MultiLabelPrediction

        public MultiLabelPrediction()
      • MultiLabelPrediction

        public MultiLabelPrediction​(int numOutputAttributes)
    • Method Detail

      • numOutputAttributes

        public int numOutputAttributes()
        Description copied from interface: Prediction
        Number of output attributes.
        Specified by:
        numOutputAttributes in interface Prediction
        Returns:
        the number of output attributes
      • numClasses

        public int numClasses​(int outputAttributeIndex)
        Description copied from interface: Prediction
        Different output attributes may have different number of classes. Regressors have one class per output attribute.
        Specified by:
        numClasses in interface Prediction
        Returns:
        the number of classes for attribute attributeIndex
      • getVotes

        public double[] getVotes​(int outputAttributeIndex)
        Description copied from interface: Prediction
        The votes for a given output attribute
        Specified by:
        getVotes in interface Prediction
        Returns:
        the votes for a given output attribute outputAttributeIndex.
      • getVotes

        public double[] getVotes()
        Description copied from interface: Prediction
        The votes for the first output attribute
        Specified by:
        getVotes in interface Prediction
        Returns:
        the votes for the first output attribute outputAttributeIndex.
      • getVote

        public double getVote​(int outputAttributeIndex,
                              int classIndex)
        Description copied from interface: Prediction
        The vote assigned to a class of an output attribute
        Specified by:
        getVote in interface Prediction
        Returns:
        the vote for an output attribute outputAttributeIndex and a class classIndex.
      • setVotes

        public void setVotes​(int outputAttributeIndex,
                             double[] votes)
        Description copied from interface: Prediction
        Sets the votes for a given output attribute
        Specified by:
        setVotes in interface Prediction
      • setVotes

        public void setVotes​(double[] votes)
        Description copied from interface: Prediction
        Sets the votes for the first output attribute
        Specified by:
        setVotes in interface Prediction
      • setVote

        public void setVote​(int outputAttributeIndex,
                            int classIndex,
                            double vote)
        Description copied from interface: Prediction
        Sets the vote for class of a given output attribute
        Specified by:
        setVote in interface Prediction
      • toString

        public String toString()
        Description copied from interface: Prediction
        The text of the prediction, that is the description of the values of the prediction
        Specified by:
        toString in interface Prediction
        Overrides:
        toString in class Object
        Returns:
        the text
      • hasVotesForAttribute

        public boolean hasVotesForAttribute​(int outputAttributeIndex)
        Description copied from interface: Prediction
        Checks if there are votes for a given output attribute
        Specified by:
        hasVotesForAttribute in interface Prediction
        Returns:
        the votes for the first output attribute outputAttributeIndex.
      • size

        public int size()
        Description copied from interface: Prediction
        The size of the prediction, that is the number of output attributes
        Specified by:
        size in interface Prediction
        Returns:
        the votes for the first output attribute outputAttributeIndex.