fix rules

This commit is contained in:
Mateusz Tylka 2023-01-27 16:04:21 +01:00
parent 08ee963d86
commit 2aee4bb263

View File

@ -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 # # Z regułami trzeba eksperymentować, można porównywać ze scorem dla sprawdzania skuteczności
# RULES # 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)" 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 (NOT (GENRES IS {genres_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 (RUNTIME IS {runtime_param}) AND (NOT (SEASONS IS {seasons_param})) THEN (RECOMMENDATION IS medium_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)" 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)" 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]) FS.add_rules([RULE1, RULE2, RULE3, RULE4, RULE5])