classification/decision.py
def aggregate(self, other: Decision) -> Decision:
        """
        Combine two decisions about the same feature if possible; use the most precise one.
        Assumes that it's about the same sample/foil and value.
        If combination is not possible, return None.
        """
        if other.feature_id != self.feature_id:
            return None

        new_sign = self.sign if other.sign == self.sign else Sign.between
        low = max(self.thresholds[0], other.thresholds[0])
        high = min(self.thresholds[1], other.thresholds[1])
        new_thresholds = [low, high]

        return Decision(self.feature_name, self.feature_id, new_sign, new_thresholds,
                        self.sample, self.value)

        Combine two decisions about the same feature if possible; use the most precise one.
        Assumes that it's about the same sample/foil and value.
        If combination is not possible, return None.
        
Combine two decisions about the same feature if possible; use the most precise one.
Assumes that it's about the same sample/foil and value.
If combination is not possible, return None.
Combine two decisions about the same feature if possible ; use the most precise one . Assumes that it ' s about the same sample / foil and value . If combination is not possible return None .
def aggregate(self, other: Decision) -> Decision:
        if other.feature_id != self.feature_id:
            return None
        new_sign = self.sign if other.sign == self.sign else Sign.between
        low = max(self.thresholds[0], other.thresholds[0])
        high = min(self.thresholds[1], other.thresholds[1])
        new_thresholds = [low, high]
        return Decision(self.feature_name, self.feature_id, new_sign, new_thresholds,
                        self.sample, self.value)
def aggregate ( self , other : Decision ) -> Decision : if other . feature_id != self . feature_id : return None new_sign = self . sign if other . sign == self . sign else Sign . between low = max ( self . thresholds [ 0 ] , other . thresholds [ 0 ] ) high = min ( self . thresholds [ 1 ] , other . thresholds [ 1 ] ) new_thresholds = [ low , high ] return Decision ( self . feature_name , self . feature_id , new_sign , new_thresholds , self . sample , self . value )
Combine two decisions about the same feature if possible; use the most precise one.
Combine two decisions about the same feature if possible ; use the most precise one .
"""
        Combine two decisions about the same feature if possible; use the most precise one.
        Assumes that it's about the same sample/foil and value.
        If combination is not possible, return None.
        """
self
other
Decision