Exemplo n.º 1
0
 def setUp(self):
     """
     self.data_c: Complete dataset/No missing values
     self.data_m: Incommplete dataset/Has missing values
     """
     mask = np.zeros((3, 3), dtype=bool)
     self.data_c = test_data(mask=mask)
     mask[0][0] = True
     self.data_m = test_data(mask=mask)
Exemplo n.º 2
0
 def setUp(self):
     """
     self.data_c: Complete dataset/No missing values
     self.data_m: Incommplete dataset/Has missing values
     """
     mask = np.zeros((5, 5), dtype=bool)
     mask[0][0] = True
     data_m = test_data(mask=mask)
     labels = np.array([1, 0, 1, 1, 0])
     self.imputed_mode = []
     self.imputed_mode.append(
         ["mode", (mode_imputation(np.copy(data_m)), labels)])
     self.imputed_mode.append(
         ["mean", (mean_imputation(np.copy(data_m)), labels)])