Example #1
0
 def test_createPatientsShape(self):
     patients = sim.create_patients(patient_count=500, observations=50)
     self.assertEqual(patients.shape[0], 500)
     # 51 because of class
     self.assertEqual(patients.shape[1], 51)
Example #2
0
 def test_scale_patients(self):
     patients = sim.create_patients()
     self.assertTrue(np.max(patients) <= 1)
Example #3
0
 def test_create_patients_ratio(self):
     patients = sim.create_patients(patient_count=500,
                                    case_control_ratio=0.5)
     self.assertEqual(sum(patients[:, -1]), 250)
Example #4
0
 def test_createPatientsShape(self):
     patients = sim.create_patients(patient_count=500, observations=50)
     self.assertEqual(patients.shape[0], 500)
     # 51 because of class
     self.assertEqual(patients.shape[1], 51)
Example #5
0
 def test_scale_patients(self):
     patients = sim.create_patients()
     self.assertTrue(np.max(patients) <= 1)
Example #6
0
 def test_create_patients_ratio(self):
     patients = sim.create_patients(patient_count=500,
                                    case_control_ratio=0.5)
     self.assertEqual(sum(patients[:, -1]), 250)