예제 #1
0
 def postcondition(self, instance, new_instance, use_tensor=True):
     new_period_x = self.features['loan_duration'].get_feature_value(
         new_instance, use_tensor, space='x')
     new_credit_x = self.features['credit_amount'].get_feature_value(
         new_instance, use_tensor, space='x')
     return cond.op_and(
         cond.op_and(cond.op_gt(new_period_x, 0, use_tensor, scale=100.),
                     cond.op_lt(new_period_x, 120, use_tensor, scale=100.),
                     use_tensor),
         cond.op_and(
             cond.op_gt(new_credit_x, 0, use_tensor, scale=100000.),
             cond.op_lt(new_credit_x, 100000, use_tensor, scale=100000.),
             use_tensor), use_tensor)
예제 #2
0
 def postcondition(self, instance, new_instance, use_tensor=True):
     new_edu = self.features['Education num'].get_feature_value(new_instance, use_tensor,
                                                                space='x')
     old_edu = self.features['Education num'].get_feature_value(instance, use_tensor,
                                                                space='x')
     new_age = self.features['Age'].get_feature_value(new_instance, use_tensor, space='x')
     old_age = self.features['Age'].get_feature_value(instance, use_tensor, space='x')
     return cond.op_and(cond.op_and(cond.op_gt(new_age, old_age, use_tensor, scale=100.),
                                    cond.op_lt(new_age, 120, use_tensor, scale=100.),
                                    use_tensor),
                        cond.op_and(cond.op_gt(new_edu, old_edu, use_tensor, scale=10.),
                                    cond.op_lt(new_edu, 16.5, use_tensor, scale=10.),
                                    use_tensor),
                        use_tensor)
예제 #3
0
 def postcondition(self, instance, new_instance, use_tensor=True):
     new_age = self.features['age_in_years'].get_feature_value(new_instance,
                                                               use_tensor,
                                                               space='x')
     old_age = self.features['age_in_years'].get_feature_value(instance,
                                                               use_tensor,
                                                               space='x')
     return cond.op_and(
         cond.op_gt(new_age, old_age, use_tensor, scale=100.),
         cond.op_lt(new_age, 120, use_tensor, scale=100.), use_tensor)
예제 #4
0
 def precondition(self, instance, use_tensor=True):
     old_credit_x = self.features['credit_amount'].get_feature_value(
         instance, use_tensor, space='x')
     return cond.op_gt(old_credit_x, 1000, use_tensor, scale=100000.)
예제 #5
0
 def precondition(self, instance, use_tensor=True):
     age = self.features['age_in_years'].get_feature_value(instance,
                                                           use_tensor,
                                                           space='x')
     return cond.op_gt(age, 15, use_tensor)
예제 #6
0
 def postcondition(self, instance, new_instance, use_tensor=True):
     new_rat = self.features['DTIRat'].get_feature_value(new_instance, use_tensor,
                                                         space='x')
     return cond.op_and(cond.op_gt(new_rat, 0, use_tensor, scale=100.),
                        cond.op_lt(new_rat, 100, use_tensor, scale=100.), use_tensor)
예제 #7
0
 def postcondition(self, instance, new_instance, use_tensor=True):
     new_unit = self.features['NumUnits'].get_feature_value(new_instance, use_tensor,
                                                            space='x')
     return cond.op_and(cond.op_gt(new_unit, 0, use_tensor, scale=10.),
                        cond.op_lt(new_unit, 5, use_tensor, scale=10.), use_tensor)
예제 #8
0
 def postcondition(self, instance, new_instance, use_tensor=True):
     new_credit = self.features['CreditScore'].get_feature_value(new_instance, use_tensor,
                                                                 space='x')
     return cond.op_and(cond.op_gt(new_credit, 300, use_tensor, scale=1000.),
                        cond.op_lt(new_credit, 850, use_tensor, scale=1000.), use_tensor)
예제 #9
0
 def postcondition(self, instance, new_instance, use_tensor=True):
     new_term = self.features['OrLoanTerm'].get_feature_value(new_instance, use_tensor,
                                                                  space='x')
     return cond.op_and(cond.op_gt(new_term, 0, use_tensor, scale=100.),
                        cond.op_lt(new_term, 800, use_tensor, scale=100.), use_tensor)
예제 #10
0
 def postcondition(self, instance, new_instance, use_tensor=True):
     new_rate = self.features['OrInterestRate'].get_feature_value(new_instance, use_tensor,
                                                                  space='x')
     return cond.op_and(cond.op_gt(new_rate, 0, use_tensor, scale=100.),
                        cond.op_lt(new_rate, 30, use_tensor, scale=100.), use_tensor)
예제 #11
0
 def postcondition(self, instance, new_instance, use_tensor=True):
     new_gain = self.features['Capital Gain'].get_feature_value(new_instance, use_tensor)
     return cond.op_and(cond.op_gt(new_gain, 0, use_tensor, scale=100000.),
                        cond.op_lt(new_gain, 100000, use_tensor, scale=100000.),
                        use_tensor)
예제 #12
0
 def postcondition(self, instance, new_instance, use_tensor=True):
     new_hours = self.features['Hours/Week'].get_feature_value(new_instance, use_tensor,
                                                               space='x')
     return cond.op_and(cond.op_gt(new_hours, 0, use_tensor, scale=100.),
                        cond.op_lt(new_hours, 90, use_tensor, scale=100.),
                        use_tensor)
예제 #13
0
 def postcondition(self, instance, new_instance, use_tensor=True):
     new_loss = self.features['Capital Loss'].get_feature_value(new_instance, use_tensor)
     return cond.op_and(cond.op_gt(new_loss, 1, use_tensor, scale=10000.),
                        cond.op_lt(new_loss, 5000, use_tensor, scale=10000.),
                        use_tensor)