poprawki
This commit is contained in:
parent
96fffa7d65
commit
b75e6ab228
@ -66,7 +66,7 @@ RULEBLOCK No1
|
||||
ACT : MIN;
|
||||
ACCU : MAX;
|
||||
|
||||
RULE 1: IF team1Form IS bardzo_slaba AND team2Form is bardzo_slaba THEN prediction is remis;
|
||||
RULE 1: IF team1Form IS bardzo_slaba AND team2Form is bardzo_slaba THEN prediction is team1;
|
||||
RULE 2: IF team1Form IS slaba AND team2Form is bardzo_slaba THEN prediction is team1;
|
||||
RULE 3: IF team1Form IS srednia AND team2Form is bardzo_slaba THEN prediction is team1;
|
||||
RULE 4: IF team1Form IS dobra AND team2Form is bardzo_slaba THEN prediction is team1;
|
||||
|
@ -65,39 +65,34 @@ public class Prediction {
|
||||
double srednio = Double.valueOf(fis.getVariable("goals").getMembership("srednio"));
|
||||
double duzo = Double.valueOf(fis.getVariable("goals").getMembership("duzo"));
|
||||
if (malo >= srednio && malo >= duzo) {
|
||||
System.out.println("PREDICTION : " + malo + "goals\n\n");
|
||||
System.out.println("PREDICTION MALO: " + malo + "goals\n\n");
|
||||
if (malo >= 0.8)
|
||||
return 0;
|
||||
if (malo <= 0.2)
|
||||
if (malo <= 0.3)
|
||||
return 2;
|
||||
return 1;
|
||||
}
|
||||
if (srednio > malo && srednio > duzo) {
|
||||
System.out.println("PREDICTION : " + srednio + "goals\n\n");
|
||||
if (srednio >= 0.7)
|
||||
System.out.println("PREDICTION SREDNIO: " + srednio + "goals\n\n");
|
||||
if (srednio >= 0.5)
|
||||
return 3;
|
||||
if (srednio < 0.7 && malo > 0)
|
||||
if (srednio < 0.5)
|
||||
return 2;
|
||||
if (srednio < 0.4 && duzo > 0)
|
||||
return 4;
|
||||
return 3;
|
||||
}
|
||||
else {
|
||||
System.out.println("PREDICTION : " + duzo + "goals\n\n");
|
||||
System.out.println("PREDICTION DUZO: " + duzo + "goals\n\n");
|
||||
if (duzo >= 0.9)
|
||||
return 8;
|
||||
if (duzo >= 0.8)
|
||||
return 7;
|
||||
if (duzo >= 0.7)
|
||||
return 6;
|
||||
if (duzo >= 0.5)
|
||||
return 5;
|
||||
if (duzo >= 0.4)
|
||||
return 4;
|
||||
return 3;
|
||||
return 4;
|
||||
}
|
||||
/*
|
||||
*
|
||||
DEFUZZIFY goals
|
||||
TERM malo := (0,1) (0.5, 1) (2,0);
|
||||
TERM srednio := (1,0) (2.5 ,1) (4,0);
|
||||
TERM duzo := (3,0) (5, 1) (5,1);
|
||||
DEFAULT := 1;
|
||||
END_DEFUZZIFY*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -127,10 +122,7 @@ END_DEFUZZIFY*/
|
||||
double team2 = Double.valueOf(fis.getVariable("prediction").getMembership("team2"));
|
||||
|
||||
int goals = makeGoals();
|
||||
if (goals > 0)
|
||||
match.setPredicted_goals(">= " + goals);
|
||||
else
|
||||
match.setPredicted_goals(goals + "");
|
||||
match.setPredicted_goals(goals);
|
||||
|
||||
variables.clear();
|
||||
if (draw >= team1 && draw >= team2) {
|
||||
|
@ -12,51 +12,50 @@ END_VAR
|
||||
VAR_OUTPUT
|
||||
goals : REAL;
|
||||
END_VAR
|
||||
|
||||
FUZZIFY team1Form
|
||||
TERM bardzo_slaba := (0, 1) (25, 0);
|
||||
TERM slaba := (20, 0) (25,1) (30,0);
|
||||
TERM srednia := (25, 0) (40, 1) (55, 0);
|
||||
TERM dobra := (50, 0) (60, 1) (70, 1);
|
||||
TERM bardzo_dobra := (65, 0) (70, 1) (100, 1);
|
||||
TERM bardzo_slaba := (0, 1) (20, 1) (25, 0) (100, 0);
|
||||
TERM slaba := (0, 0) (20, 0) (25,1) (30,0) (100, 0);
|
||||
TERM srednia := (0, 0) (25, 0) (45, 1) (55, 0) (100, 0);
|
||||
TERM dobra := (0, 0) (50, 0) (60, 1) (80, 0) (100, 0);
|
||||
TERM bardzo_dobra := (0, 0) (75, 0) (85, 1) (100, 1);
|
||||
END_FUZZIFY
|
||||
|
||||
FUZZIFY team2Form
|
||||
TERM bardzo_slaba := (0, 1) (25, 0);
|
||||
TERM slaba := (20, 0) (25,1) (30,0);
|
||||
TERM srednia := (25, 0) (40, 1) (55, 0);
|
||||
TERM dobra := (50, 0) (60, 1) (70, 1);
|
||||
TERM bardzo_dobra := (65, 0) (70, 1) (100, 1);
|
||||
TERM bardzo_slaba := (0, 1) (20, 1) (25, 0) (100, 0);
|
||||
TERM slaba := (0, 0) (20, 0) (25,1) (30,0) (100, 0);
|
||||
TERM srednia := (0, 0) (25, 0) (45, 1) (55, 0) (100, 0);
|
||||
TERM dobra := (0, 0) (50, 0) (60, 1) (80, 0) (100, 0);
|
||||
TERM bardzo_dobra := (0, 0) (75, 0) (85, 1) (100, 1);
|
||||
END_FUZZIFY
|
||||
|
||||
FUZZIFY team1GoalsAverage
|
||||
TERM malo := (0, 1) (1, 0);
|
||||
TERM srednio := (1, 0) (1.5,1) (2,0);
|
||||
TERM duzo := (2, 0) (3, 1) (10, 1);
|
||||
TERM malo := (0, 1) (0.25, 1) (0.75, 0) (10, 0);
|
||||
TERM srednio := (0, 0) (1, 0) (1.25, 1) (2, 0) (10, 0);
|
||||
TERM duzo := (0, 0) (2, 0) (2.5, 1) (10, 1);
|
||||
END_FUZZIFY
|
||||
|
||||
FUZZIFY team2GoalsAverage
|
||||
TERM malo := (0, 1) (1, 0);
|
||||
TERM srednio := (1, 0) (1.5,1) (2,0);
|
||||
TERM duzo := (2, 0) (3, 1) (10, 1);
|
||||
TERM malo := (0, 1) (0.25, 1) (0.75, 0) (10, 0);
|
||||
TERM srednio := (0, 0) (1, 0) (1.25, 1) (2, 0) (10, 0);
|
||||
TERM duzo := (0, 0) (2, 0) (2.5, 1) (10, 1);
|
||||
END_FUZZIFY
|
||||
|
||||
FUZZIFY team1GoalsLostAverage
|
||||
TERM malo := (0, 1) (1, 0);
|
||||
TERM srednio := (1, 0) (1.5,1) (2,0);
|
||||
TERM duzo := (2, 0) (3, 1) (10, 1);
|
||||
TERM malo := (0, 1) (0.25, 1) (1, 0) (10, 0);
|
||||
TERM srednio := (0, 0) (1, 0) (1.25, 1) (2, 0) (10, 0);
|
||||
TERM duzo := (0, 0) (2, 0) (2.5, 1) (10, 1);
|
||||
END_FUZZIFY
|
||||
|
||||
FUZZIFY team2GoalsLostAverage
|
||||
TERM malo := (0, 1) (1, 0);
|
||||
TERM srednio := (1, 0) (1.5,1) (2,0);
|
||||
TERM duzo := (2, 0) (3, 1) (10, 1);
|
||||
TERM malo := (0, 1) (0.25, 1) (1, 0) (10, 0);
|
||||
TERM srednio := (0, 0) (1, 0) (1.25, 1) (2, 0) (10, 0);
|
||||
TERM duzo := (0, 0) (2, 0) (2.5, 1) (10, 1);
|
||||
END_FUZZIFY
|
||||
|
||||
DEFUZZIFY goals
|
||||
TERM malo := (0,1) (0.5, 1) (2,0);
|
||||
TERM srednio := (1,0) (2.5 ,1) (4,0);
|
||||
TERM duzo := (3,0) (5, 1) (5,1);
|
||||
TERM srednio := (1,0) (2,1) (3,1) (4,0);
|
||||
TERM duzo := (3,0) (5, 1) (8,1);
|
||||
DEFAULT := 1;
|
||||
END_DEFUZZIFY
|
||||
|
||||
@ -65,59 +64,36 @@ RULEBLOCK No1
|
||||
ACT : MIN;
|
||||
ACCU : MAX;
|
||||
|
||||
RULE 1: IF team1Form IS bardzo_slaba AND team2Form is bardzo_slaba THEN goals is malo;
|
||||
RULE 2: IF team1Form IS slaba AND team2Form is bardzo_slaba THEN goals is malo;
|
||||
RULE 3: IF team1Form IS srednia AND team2Form is bardzo_slaba THEN goals is malo;
|
||||
RULE 4: IF team1Form IS dobra AND team2Form is bardzo_slaba THEN goals is srednio;
|
||||
RULE 5: IF team1Form IS bardzo_dobra AND team2Form is bardzo_slaba THEN goals is duzo;
|
||||
|
||||
RULE 6: IF team1Form IS bardzo_slaba AND team2Form is slaba THEN goals is malo;
|
||||
RULE 7: IF team1Form IS slaba AND team2Form is slaba THEN goals is srednio;
|
||||
RULE 8: IF team1Form IS srednia AND team2Form is slaba THEN goals is srednio;
|
||||
RULE 9: IF team1Form IS dobra AND team2Form is slaba THEN goals is srednio;
|
||||
RULE 10: IF team1Form IS bardzo_dobra AND team2Form is slaba THEN goals is duzo;
|
||||
|
||||
RULE 11: IF team1Form IS bardzo_slaba AND team2Form is srednia THEN goals is srednio;
|
||||
RULE 12: IF team1Form IS slaba AND team2Form is srednia THEN goals is malo;
|
||||
RULE 13: IF team1Form IS srednia AND team2Form is srednia THEN goals is malo;
|
||||
RULE 14: IF team1Form IS dobra AND team2Form is srednia THEN goals is srednio;
|
||||
RULE 15: IF team1Form IS bardzo_dobra AND team2Form is srednia THEN goals is srednio;
|
||||
RULE 1: IF team1GoalsAverage IS malo AND team2GoalsAverage is malo THEN goals is malo;
|
||||
RULE 2: IF team1GoalsAverage IS srednio AND team2GoalsAverage is malo THEN goals is srednio;
|
||||
RULE 3: IF team1GoalsAverage IS duzo AND team2GoalsAverage is malo THEN goals is srednio;
|
||||
|
||||
RULE 16: IF team1Form IS bardzo_slaba AND team2Form is dobra THEN goals is duzo;
|
||||
RULE 17: IF team1Form IS slaba AND team2Form is dobra THEN goals is duzo;
|
||||
RULE 18: IF team1Form IS srednia AND team2Form is dobra THEN goals is malo;
|
||||
RULE 19: IF team1Form IS dobra AND team2Form is dobra THEN goals is malo;
|
||||
RULE 20: IF team1Form IS bardzo_dobra AND team2Form is dobra THEN goals is srednio;
|
||||
RULE 4: IF team1GoalsAverage IS malo AND team2GoalsAverage is srednio THEN goals is srednio;
|
||||
RULE 5: IF team1GoalsAverage IS srednio AND team2GoalsAverage is srednio THEN goals is srednio;
|
||||
RULE 6: IF team1GoalsAverage IS duzo AND team2GoalsAverage is srednio THEN goals is duzo;
|
||||
|
||||
RULE 21: IF team1Form IS bardzo_slaba AND team2Form is bardzo_dobra THEN goals is duzo;
|
||||
RULE 22: IF team1Form IS slaba AND team2Form is bardzo_dobra THEN goals is duzo;
|
||||
RULE 23: IF team1Form IS srednia AND team2Form is bardzo_dobra THEN goals is duzo;
|
||||
RULE 24: IF team1Form IS dobra AND team2Form is bardzo_dobra THEN goals is srednio;
|
||||
RULE 25: IF team1Form IS bardzo_dobra AND team2Form is bardzo_dobra THEN goals is malo;
|
||||
RULE 7: IF team1GoalsAverage IS malo AND team2GoalsAverage is duzo THEN goals is srednio;
|
||||
RULE 8: IF team1GoalsAverage IS srednio AND team2GoalsAverage is duzo THEN goals is duzo;
|
||||
RULE 9: IF team1GoalsAverage IS duzo AND team2GoalsAverage is duzo THEN goals is duzo;
|
||||
|
||||
RULE 26: IF team1GoalsAverage IS malo AND team2GoalsAverage is malo THEN goals is malo;
|
||||
RULE 27: IF team1GoalsAverage IS srednio AND team2GoalsAverage is malo THEN goals is malo;
|
||||
RULE 28: IF team1GoalsAverage IS duzo AND team2GoalsAverage is malo THEN goals is duzo;
|
||||
RULE 10: IF team1GoalsLostAverage IS malo AND team2GoalsLostAverage is malo THEN goals is malo;
|
||||
RULE 11: IF team1GoalsLostAverage IS srednio AND team2GoalsLostAverage is malo THEN goals is srednio;
|
||||
RULE 12: IF team1GoalsLostAverage IS duzo AND team2GoalsLostAverage is malo THEN goals is srednio;
|
||||
|
||||
RULE 29: IF team1GoalsAverage IS malo AND team2GoalsAverage is srednio THEN goals is malo;
|
||||
RULE 30: IF team1GoalsAverage IS srednio AND team2GoalsAverage is srednio THEN goals is srednio;
|
||||
RULE 31: IF team1GoalsAverage IS duzo AND team2GoalsAverage is srednio THEN goals is duzo;
|
||||
RULE 13: IF team1GoalsLostAverage IS malo AND team2GoalsLostAverage is srednio THEN goals is srednio;
|
||||
RULE 14: IF team1GoalsLostAverage IS srednio AND team2GoalsLostAverage is srednio THEN goals is srednio;
|
||||
RULE 15: IF team1GoalsLostAverage IS duzo AND team2GoalsLostAverage is srednio THEN goals is srednio;
|
||||
|
||||
RULE 32: IF team1GoalsAverage IS malo AND team2GoalsAverage is duzo THEN goals is duzo;
|
||||
RULE 33: IF team1GoalsAverage IS srednio AND team2GoalsAverage is duzo THEN goals is duzo;
|
||||
RULE 34: IF team1GoalsAverage IS duzo AND team2GoalsAverage is duzo THEN goals is duzo;
|
||||
RULE 16: IF team1GoalsLostAverage IS malo AND team2GoalsLostAverage is duzo THEN goals is srednio;
|
||||
RULE 17: IF team1GoalsLostAverage IS srednio AND team2GoalsLostAverage is duzo THEN goals is srednio;
|
||||
RULE 18: IF team1GoalsLostAverage IS duzo AND team2GoalsLostAverage is duzo THEN goals is duzo;
|
||||
|
||||
RULE 35: IF team1GoalsLostAverage IS malo AND team2GoalsLostAverage is malo THEN goals is malo;
|
||||
RULE 36: IF team1GoalsLostAverage IS srednio AND team2GoalsLostAverage is malo THEN goals is malo;
|
||||
RULE 37: IF team1GoalsLostAverage IS duzo AND team2GoalsLostAverage is malo THEN goals is srednio;
|
||||
RULE 19: IF team1GoalsLostAverage IS malo AND team2GoalsAverage is duzo then goals is srednio;
|
||||
RULE 20: IF team2GoalsLostAverage IS malo AND team1GoalsAverage is duzo then goals is srednio;
|
||||
|
||||
RULE 38: IF team1GoalsLostAverage IS malo AND team2GoalsLostAverage is srednio THEN goals is malo;
|
||||
RULE 39: IF team1GoalsLostAverage IS srednio AND team2GoalsLostAverage is srednio THEN goals is srednio;
|
||||
RULE 40: IF team1GoalsLostAverage IS duzo AND team2GoalsLostAverage is srednio THEN goals is duzo;
|
||||
|
||||
RULE 41: IF team1GoalsLostAverage IS malo AND team2GoalsLostAverage is duzo THEN goals is duzo;
|
||||
RULE 42: IF team1GoalsLostAverage IS srednio AND team2GoalsLostAverage is duzo THEN goals is duzo;
|
||||
RULE 43: IF team1GoalsLostAverage IS duzo AND team2GoalsLostAverage is duzo THEN goals is duzo;
|
||||
|
||||
END_RULEBLOCK
|
||||
|
||||
|
@ -55,6 +55,6 @@ public class Match {
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private String predicted_goals;// +0.5 +1.5 +2.5 +3.5
|
||||
private Integer predicted_goals;// +0.5 +1.5 +2.5 +3.5
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ public class MatchDTO {
|
||||
private String result;
|
||||
private Integer goals;
|
||||
private String predictedResult;
|
||||
private String predictedGoals;
|
||||
private Integer predictedGoals;
|
||||
private String season;
|
||||
private String date;
|
||||
private String teamName1;
|
||||
|
7371
Front/package-lock.json
generated
7371
Front/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -17,14 +17,15 @@
|
||||
"@angular/compiler": "^9.0.2",
|
||||
"@angular/core": "^9.0.2",
|
||||
"@angular/forms": "^9.0.2",
|
||||
"@angular/material": "^9.2.3",
|
||||
"@angular/platform-browser": "^9.0.2",
|
||||
"@angular/platform-browser-dynamic": "^9.0.2",
|
||||
"@angular/router": "^9.0.2",
|
||||
"@angular/material": "^9.2.3",
|
||||
"@fortawesome/angular-fontawesome": "^0.6.1",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.28",
|
||||
"@fortawesome/free-brands-svg-icons": "^5.13.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.13.0",
|
||||
"npm": "^6.14.5",
|
||||
"primeicons": "3.0.0-rc.1",
|
||||
"primeng": "9.0.6",
|
||||
"rxjs": "^6.5.4",
|
||||
|
Loading…
Reference in New Issue
Block a user