This commit is contained in:
s460941 2020-06-15 13:29:11 +02:00
parent 19b7f6b344
commit c146e7868d
3 changed files with 53 additions and 37 deletions

View File

@ -4,8 +4,6 @@
<list default="true" id="0fc070d1-3753-43f5-b5e7-37c2bc110b95" name="Default Changelist" comment=""> <list default="true" id="0fc070d1-3753-43f5-b5e7-37c2bc110b95" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/matches_list.csv" beforeDir="false" afterPath="$PROJECT_DIR$/matches_list.csv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/teams_list.csv" beforeDir="false" afterPath="$PROJECT_DIR$/teams_list.csv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/worker.fcl" beforeDir="false" afterPath="$PROJECT_DIR$/worker.fcl" afterDir="false" /> <change beforePath="$PROJECT_DIR$/worker.fcl" beforeDir="false" afterPath="$PROJECT_DIR$/worker.fcl" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
@ -92,42 +90,42 @@
<screen x="67" y="27" width="1533" height="873" /> <screen x="67" y="27" width="1533" height="873" />
</state> </state>
<state x="291" y="120" key="#com.intellij.execution.impl.EditConfigurationsDialog/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1591713379914" /> <state x="291" y="120" key="#com.intellij.execution.impl.EditConfigurationsDialog/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1591713379914" />
<state width="1510" height="218" key="GridCell.Tab.0.bottom" timestamp="1592216066059"> <state width="1510" height="224" key="GridCell.Tab.0.bottom" timestamp="1592220349610">
<screen x="67" y="27" width="1533" height="873" /> <screen x="67" y="27" width="1533" height="873" />
</state> </state>
<state width="1510" height="218" key="GridCell.Tab.0.bottom/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592216066059" /> <state width="1510" height="224" key="GridCell.Tab.0.bottom/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592220349610" />
<state width="1510" height="218" key="GridCell.Tab.0.center" timestamp="1592216066058"> <state width="1510" height="224" key="GridCell.Tab.0.center" timestamp="1592220349610">
<screen x="67" y="27" width="1533" height="873" /> <screen x="67" y="27" width="1533" height="873" />
</state> </state>
<state width="1510" height="218" key="GridCell.Tab.0.center/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592216066058" /> <state width="1510" height="224" key="GridCell.Tab.0.center/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592220349610" />
<state width="1510" height="218" key="GridCell.Tab.0.left" timestamp="1592216066057"> <state width="1510" height="224" key="GridCell.Tab.0.left" timestamp="1592220349610">
<screen x="67" y="27" width="1533" height="873" /> <screen x="67" y="27" width="1533" height="873" />
</state> </state>
<state width="1510" height="218" key="GridCell.Tab.0.left/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592216066057" /> <state width="1510" height="224" key="GridCell.Tab.0.left/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592220349610" />
<state width="1510" height="218" key="GridCell.Tab.0.right" timestamp="1592216066059"> <state width="1510" height="224" key="GridCell.Tab.0.right" timestamp="1592220349610">
<screen x="67" y="27" width="1533" height="873" /> <screen x="67" y="27" width="1533" height="873" />
</state> </state>
<state width="1510" height="218" key="GridCell.Tab.0.right/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592216066059" /> <state width="1510" height="224" key="GridCell.Tab.0.right/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592220349610" />
<state width="1510" height="207" key="GridCell.Tab.1.bottom" timestamp="1592215668952"> <state width="1510" height="207" key="GridCell.Tab.1.bottom" timestamp="1592220319922">
<screen x="67" y="27" width="1533" height="873" /> <screen x="67" y="27" width="1533" height="873" />
</state> </state>
<state width="1510" height="207" key="GridCell.Tab.1.bottom/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592215668952" /> <state width="1510" height="207" key="GridCell.Tab.1.bottom/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592220319922" />
<state width="1510" height="207" key="GridCell.Tab.1.center" timestamp="1592215668952"> <state width="1510" height="207" key="GridCell.Tab.1.center" timestamp="1592220319922">
<screen x="67" y="27" width="1533" height="873" /> <screen x="67" y="27" width="1533" height="873" />
</state> </state>
<state width="1510" height="207" key="GridCell.Tab.1.center/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592215668952" /> <state width="1510" height="207" key="GridCell.Tab.1.center/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592220319922" />
<state width="1510" height="207" key="GridCell.Tab.1.left" timestamp="1592215668952"> <state width="1510" height="207" key="GridCell.Tab.1.left" timestamp="1592220319922">
<screen x="67" y="27" width="1533" height="873" /> <screen x="67" y="27" width="1533" height="873" />
</state> </state>
<state width="1510" height="207" key="GridCell.Tab.1.left/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592215668952" /> <state width="1510" height="207" key="GridCell.Tab.1.left/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592220319922" />
<state width="1510" height="207" key="GridCell.Tab.1.right" timestamp="1592215668952"> <state width="1510" height="207" key="GridCell.Tab.1.right" timestamp="1592220319922">
<screen x="67" y="27" width="1533" height="873" /> <screen x="67" y="27" width="1533" height="873" />
</state> </state>
<state width="1510" height="207" key="GridCell.Tab.1.right/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592215668952" /> <state width="1510" height="207" key="GridCell.Tab.1.right/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592220319922" />
<state width="766" height="437" key="XDebugger.FullValuePopup" timestamp="1592211406584"> <state width="766" height="437" key="XDebugger.FullValuePopup" timestamp="1592220297166">
<screen x="67" y="27" width="1533" height="873" /> <screen x="67" y="27" width="1533" height="873" />
</state> </state>
<state width="766" height="437" key="XDebugger.FullValuePopup/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592211406584" /> <state width="766" height="437" key="XDebugger.FullValuePopup/67.27.1533.873/1600.0.1920.1080@67.27.1533.873" timestamp="1592220297166" />
<state x="376" y="181" width="904" height="562" key="com.intellij.xdebugger.impl.breakpoints.ui.BreakpointsDialogFactory$2" timestamp="1591723368763"> <state x="376" y="181" width="904" height="562" key="com.intellij.xdebugger.impl.breakpoints.ui.BreakpointsDialogFactory$2" timestamp="1591723368763">
<screen x="67" y="27" width="1533" height="873" /> <screen x="67" y="27" width="1533" height="873" />
</state> </state>
@ -138,8 +136,18 @@
<breakpoints> <breakpoints>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line"> <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/main.py</url> <url>file://$PROJECT_DIR$/main.py</url>
<line>98</line> <line>119</line>
<option name="timeStamp" value="19" /> <option name="timeStamp" value="24" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/main.py</url>
<line>120</line>
<option name="timeStamp" value="26" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/main.py</url>
<line>121</line>
<option name="timeStamp" value="27" />
</line-breakpoint> </line-breakpoint>
</breakpoints> </breakpoints>
</breakpoint-manager> </breakpoint-manager>

15
main.py
View File

@ -101,9 +101,9 @@ for i in range(0,matches.shape[0]):
x = float("{:.4f}".format(x)) x = float("{:.4f}".format(x))
#y = int(round(x)) #y = int(round(x))
if x > 0.2: if x > 0.1:
y = 1 y = 1
elif x < -0.2: elif x < -0.1:
y = -1 y = -1
else: else:
y = 0 y = 0
@ -112,10 +112,21 @@ for i in range(0,matches.shape[0]):
num = 0 num = 0
cor = 0 cor = 0
home_count = 0
draw_count = 0
away_count = 0
for i in range(0,matches.shape[0]): for i in range(0,matches.shape[0]):
if (matches_input[i][5] == -1): home_count+=1
if (matches_input[i][5] == 0): draw_count += 1
if (matches_input[i][5] == 1): away_count += 1
if(predictions[i]==matches_input[i][5]): if(predictions[i]==matches_input[i][5]):
cor+=1 cor+=1
num+=1 num+=1
else: else:
num+=1 num+=1
from collections import Counter
print("Predictions: " + str(Counter(predictions).keys()))
print("Predictions: " + str(Counter(predictions).values()))
print("GT: " + str(home_count) + " " + str(draw_count) + " " + str(away_count))
print(float(cor/num)) print(float(cor/num))

View File

@ -28,9 +28,9 @@ END_FUZZIFY
FUZZIFY points FUZZIFY points
RANGE := (-30.000 .. 30.000); RANGE := (-30.000 .. 30.000);
TERM low := (-20,1)(-5,0); TERM low := (-25,1)(-10,0);
TERM avg := (-10,0)(-3,1)(3,1)(10,0); TERM avg := (-10,0)(-3,1)(3,1)(10,0);
TERM high := (10,0)(20,1); TERM high := (10,0)(25,1);
END_FUZZIFY END_FUZZIFY
FUZZIFY xGform1 FUZZIFY xGform1
@ -65,31 +65,28 @@ RULEBLOCK
RULE 0 : if form1 is great and form2 is bad then result is home RULE 0 : if form1 is great and form2 is bad then result is home
// rozbicie home // rozbicie home
RULE 3 : if form1 is great and form2 is avg and points is low then result is draw RULE 3 : if form1 is great and form2 is avg and points is low then result is draw
RULE 1 : if form1 is great and form2 is avg and points is avg and (xGform1 is luck or xGform2 is badluck) then result is draw
RULE 4 : if form1 is great and form2 is avg and points is avg then result is home RULE 4 : if form1 is great and form2 is avg and points is avg then result is home
RULE 2 : if form1 is great and form2 is avg and points is high and (xGform1 is luck or xGform2 is badluck) then result is draw
RULE 5 : if form1 is great and form2 is avg and points is high then result is home RULE 5 : if form1 is great and form2 is avg and points is high then result is home
//rozbicie //rozbicie
RULE 6 : if form1 is great and form2 is great and points is low then result is away RULE 6 : if form1 is great and form2 is great and points is low then result is away
RULE 7 : if form1 is great and form2 is great and points is avg then result is draw RULE 7 : if form1 is great and form2 is great and points is avg then result is home
RULE 8 : if form1 is great and form2 is great and points is high then result is home RULE 8 : if form1 is great and form2 is great and points is high then result is home
//rozbicie tego jednego home coś dało //rozbicie tego jednego home coś dało
RULE 31 : if form1 is avg and form2 is bad and points is low then result is away RULE 31 : if form1 is avg and form2 is bad and points is low then result is draw
RULE 32 : if form1 is avg and form2 is bad and points is avg then result is draw RULE 32 : if form1 is avg and form2 is bad and points is avg then result is home
RULE 33 : if form1 is avg and form2 is bad and points is high then result is home RULE 33 : if form1 is avg and form2 is bad and points is high then result is home
//rozbicie //rozbicie
RULE 34 : if form1 is avg and form2 is avg and points is low then result is away RULE 34 : if form1 is avg and form2 is avg and points is low then result is away
RULE 35 : if form1 is avg and form2 is avg and points is avg then result is draw RULE 35 : if form1 is avg and form2 is avg and points is avg then result is home
RULE 36 : if form1 is avg and form2 is avg and points is high then result is home RULE 36 : if form1 is avg and form2 is avg and points is high then result is home
// rozbicie away // rozbicie away
RULE 37 : if form1 is avg and form2 is great and points is low then result is away RULE 37 : if form1 is avg and form2 is great and points is low then result is away
RULE 38 : if form1 is avg and form2 is great and points is avg then result is draw RULE 38 : if form1 is avg and form2 is great and points is avg then result is away
RULE 39 : if form1 is avg and form2 is great and points is high then result is home RULE 39 : if form1 is avg and form2 is great and points is high then result is home
RULE 40 : if form1 is avg and form2 is great and points is high and (xGform1 is badluck or xGform2 is luck) then result is draw RULE 40 : if form1 is avg and form2 is great and points is high and (xGform1 is badluck or xGform2 is luck) then result is home
// rozbicie // rozbicie
RULE 61 : if form1 is bad and form2 is bad and points is low then result is away RULE 61 : if form1 is bad and form2 is bad and points is low then result is away
RULE 62 : if form1 is bad and form2 is bad and points is avg then result is draw RULE 62 : if form1 is bad and form2 is bad and points is avg then result is draw
@ -99,8 +96,8 @@ RULEBLOCK
RULE 66 : if form1 is bad and form2 is avg then result is away RULE 66 : if form1 is bad and form2 is avg then result is away
// rozbicie away // rozbicie away
RULE 67 : if form1 is bad and form2 is great and points is low then result is away RULE 67 : if form1 is bad and form2 is great and points is low then result is away
RULE 68 : if form1 is bad and form2 is great and points is avg then result is draw RULE 68 : if form1 is bad and form2 is great and points is avg then result is away
RULE 69 : if form1 is bad and form2 is great and points is low then result is draw RULE 69 : if form1 is bad and form2 is great and points is high then result is draw
END_RULEBLOCK END_RULEBLOCK