Class HintAddLabel

  • All Implemented Interfaces:
    Hint

    public final class HintAddLabel
    extends HintAddPairs
    Hint to add pairs for subsets that have too few True/False labels.
    • Method Detail

      • getLabel

        public RecPair.Label getLabel()
        Returns:
        the label used to generate this hint.
      • create

        public static HintAddLabel create​(FeatureQuery fq,
                                          DatasetStats trainStats,
                                          RecPair.Label label,
                                          double minProportion)
        Creates a hint object with all subsets where the proportion of pairs with the given label is lower than minProportion.
        Parameters:
        trainStats - - statistics for training dataset (for all pairs with bool labels).
        label - - the label to create the hint for.
        minProportion - - minimum proportion of the label required for balanced subset. Subsets that have fewer pairs with this label are added to the hint.
        Returns:
        the new hint object. Returns null if no such subsets can be found (all subsets in training dataset have balanced labels).
        Throws:
        java.lang.IllegalArgumentException - if minProportion is not in [0; 0.5] range.