From 2aee4bb2631bdbda40893a34729db12df2ac9899 Mon Sep 17 00:00:00 2001 From: Mateusz Tylka Date: Fri, 27 Jan 2023 16:04:21 +0100 Subject: [PATCH] fix rules --- engine.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine.py b/engine.py index 6c28233..0808cfc 100644 --- a/engine.py +++ b/engine.py @@ -63,9 +63,9 @@ def fuzzy_system(release_year_param, runtime_param, seasons_param, genres_param, # # Z regułami trzeba eksperymentować, można porównywać ze scorem dla sprawdzania skuteczności # RULES - RULE1 = f"IF (NOT (RELEASE_YEAR IS {release_year_param})) AND (NOT (RUNTIME IS {runtime_param})) AND (NOT (SEASONS IS {seasons_param})) THEN (RECOMMENDATION IS low_recommendation)" - RULE2 = f"IF (NOT (EMOTIONS IS {emotions_param})) AND (NOT (GENRES IS {genres_param})) THEN (RECOMMENDATION IS low_recommendation)" - RULE3 = f"IF (NOT (RELEASE_YEAR IS {release_year_param})) AND (RUNTIME IS {runtime_param}) AND (NOT (SEASONS IS {seasons_param})) THEN (RECOMMENDATION IS medium_recommendation)" + RULE1 = f"IF (NOT (RELEASE_YEAR IS {release_year_param}) AND (RUNTIME IS {runtime_param}) AND (SEASONS IS {seasons_param})) THEN (RECOMMENDATION IS low_recommendation)" + RULE2 = f"IF (NOT (EMOTIONS IS {emotions_param}) AND (GENRES IS {genres_param})) THEN (RECOMMENDATION IS low_recommendation)" + RULE3 = f"IF (NOT (RELEASE_YEAR IS {release_year_param}) AND (SEASONS IS {seasons_param})) THEN (RECOMMENDATION IS medium_recommendation)" RULE4 = f"IF (EMOTIONS IS {emotions_param}) AND (GENRES IS {genres_param}) THEN (RECOMMENDATION IS medium_recommendation)" RULE5 = f"IF (RELEASE_YEAR IS {release_year_param}) AND (RUNTIME IS {runtime_param}) AND (SEASONS IS {seasons_param}) AND (EMOTIONS IS {emotions_param}) AND (GENRES IS {genres_param}) THEN (RECOMMENDATION IS high_recommendation)" FS.add_rules([RULE1, RULE2, RULE3, RULE4, RULE5])