コード例 #1
0
ファイル: sim_test.py プロジェクト: yishingene/DAPS
 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)
コード例 #2
0
ファイル: sim_test.py プロジェクト: yishingene/DAPS
 def test_scale_patients(self):
     patients = sim.create_patients()
     self.assertTrue(np.max(patients) <= 1)
コード例 #3
0
ファイル: sim_test.py プロジェクト: yishingene/DAPS
 def test_create_patients_ratio(self):
     patients = sim.create_patients(patient_count=500,
                                    case_control_ratio=0.5)
     self.assertEqual(sum(patients[:, -1]), 250)
コード例 #4
0
ファイル: sim_test.py プロジェクト: greenelab/DAPS
 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)
コード例 #5
0
ファイル: sim_test.py プロジェクト: greenelab/DAPS
 def test_scale_patients(self):
     patients = sim.create_patients()
     self.assertTrue(np.max(patients) <= 1)
コード例 #6
0
ファイル: sim_test.py プロジェクト: greenelab/DAPS
 def test_create_patients_ratio(self):
     patients = sim.create_patients(patient_count=500,
                                    case_control_ratio=0.5)
     self.assertEqual(sum(patients[:, -1]), 250)