Exemple #1
0
 def __init__(self, dataset):
     self.__dataset = dataset
     dataset = HandManager(self.__dataset)
     self.__patients_paths = dataset.get_files_path()
     self.__patients_paths = HandManager.filter_file(self.__patients_paths, MINIMUM_SAMPLES)
     self.__patients = HandManager.get_ids_from_dir(dataset.get_patient_paths())
     self.__patients.sort()
 def execute_emothaw_experiment(self):
     file_manager = HandManager("ConvertedEmothaw")
     rhs_extraction = RHSDistanceExtract(self.__file_samples, NUM_FILE_SAMPLES)
     ids_task = TaskManager.get_task_from_paths(file_manager.get_files_path(), self.__test_task)
     for id in ids_task:
         paths = ids_task.get(id)
         for task_path in paths:
             tensor = rhs_extraction.extract_rhs_file(task_path)
             result = self.__ml_model.predict_result(tensor)
             counter_result = Counter(result)
             print("Id: ", id, "file: ", task_path)
             healthy = counter_result.get(0) / len(result) * 100
             print("Healthy: ", healthy, "%")
             print("Disease: ", 100 - healthy, "%")