diff --git a/engine.py b/engine.py index 3e7588b..f2bd1e8 100644 --- a/engine.py +++ b/engine.py @@ -68,6 +68,7 @@ emotions_same = TriangleFuzzySet(0, 4, 4, term="same") FS.add_linguistic_variable("EMOTIONS", LinguisticVariable( [emotions_different, emotions_similar, emotions_same], universe_of_discourse=[-8, 8] )) +# Nie crisp tylko tak jak te powyżej zdefiniować FS.set_crisp_output_value("low_recomendation", 0) FS.set_crisp_output_value("medium_recomendation", 50) FS.set_crisp_output_value("high_recomendation", 100) @@ -77,6 +78,7 @@ RULE2 = "IF (EMOTIONS IS different) AND (GENRES IS different) THEN (RECOMENDATIO RULE3 = "IF (RELEASE_YEAR IS newer) AND (RUNTIME IS similar) AND (SEASONS IS less) THEN (RECOMENDATION IS medium_recomendation)" RULE4 = "IF (EMOTIONS IS similar) AND (GENRES IS similar) THEN (RECOMENDATION IS medium_recomendation)" RULE5 = "IF (RELEASE_YEAR IS similar) AND (RUNTIME IS similar) AND (SEASONS IS similar) AND (EMOTIONS IS same) AND (GENRES IS same) THEN (RECOMENDATION IS high_recomendation)" +# Z regułami trzeba eksperymentować, można porównywać ze scorem dla sprawdzania skuteczności FS.add_rules([RULE1, RULE2, RULE3, RULE4, RULE5]) @@ -86,4 +88,6 @@ FS.set_variable("SEASONS", -2.0) FS.set_variable("GENRES", 50.0) FS.set_variable("EMOTIONS", 1.0) -print(FS.inference(["RECOMENDATION"])) \ No newline at end of file +print(FS.inference(["RECOMENDATION"])) + +FS.produce_figure(outputfile='file.pdf') \ No newline at end of file diff --git a/file.pdf b/file.pdf new file mode 100644 index 0000000..d631dfd Binary files /dev/null and b/file.pdf differ