recall += metric.recall() matrices += [metric.confusion_matrix()] f1 /= n_folds precision /= n_folds recall /= n_folds matrices = np.array(matrices) return f1, precision, recall, matrices if __name__ == '__main__': print('Q-Learning') # MIT1 has not overlapping activities path = DatasetPath.MIT2 dp = DataProcessor(path=path) dp.data_processed = Parser().data() ql = QLearning(dp) ql.fit(dp.data_processed) f1, precision, recall, matrices = ql.evaluate() print(f'F1 = {f1}') print(f'Precision = {precision}') print(f'Recall = {recall}')