def test_et_algorithm(self):
     input_data = {
         "Gender": "Male",
         "Married": "Yes",
         "Dependents": 2,
         "Education": "Graduate",
         "Self_Employed": "Yes",
         "ApplicantIncome": 5849,
         "CoapplicantIncome": 6000,
         "LoanAmount": 120,
         "Loan_Amount_Term": 360,
         "Credit_History": 1,
         "Property_Area": "Urban",
     }
     my_alg = ExtraTreesClassifier()
     response = my_alg.compute_prediction(input_data)
     self.assertEqual("OK", response["status"])
     self.assertTrue("label" in response)
     self.assertEqual("Approved", response["label"])
Example #2
0
 def test_et_algorithm(self):
     input_data = {
         "age": 37,
         "workplace": "Private",
         "fnlwgt": 34146,
         "education": "HS-grad",
         "education-num": 9,
         "marital-status": "Married-civ-spouse",
         "occupation": "Craft-repair",
         "relationship": "Husband",
         "race": "White",
         "sex": "Male",
         "capital-gain": 0,
         "capital-loss": 0,
         "hours-per-week": 68,
         "native-country": "United-States"
     }
     my_alg = ExtraTreesClassifier()
     response = my_alg.compute_prediction(input_data)
     self.assertEqual('OK', response['status'])
     self.assertTrue('label' in response)
     self.assertEqual('<=50K', response['label'])
Example #3
0
 def test_et_algorithm(self):
     my_alg = ExtraTreesClassifier()
     response = my_alg.compute_prediction(self.input_data)
     self.assertEqual('OK', response['status'])
     self.assertTrue('label' in response)
     self.assertEqual('<=50K', response['label'])