2023-01-17 21:56:21 +01:00
|
|
|
from DataOperations import *
|
2023-01-31 10:54:42 +01:00
|
|
|
from get_test_data import get_test_data
|
|
|
|
import numpy as np
|
2023-01-17 21:56:21 +01:00
|
|
|
|
|
|
|
|
2023-01-31 10:54:42 +01:00
|
|
|
# Code prints results for 50 matches from 3 different leagues
|
|
|
|
test_data = get_test_data()
|
|
|
|
team_a_win = test_data["team_a_win"]
|
|
|
|
teams_a = test_data["teams_a"]
|
|
|
|
teams_b = test_data["teams_b"]
|
|
|
|
team_a_games = test_data["team_a_games"]
|
|
|
|
team_b_games = test_data["team_b_games"]
|
|
|
|
|
2023-01-17 21:56:21 +01:00
|
|
|
FS = create_fuzzy_system()
|
|
|
|
|
2023-01-31 10:54:42 +01:00
|
|
|
for x in range(50):
|
|
|
|
if x < 20:
|
|
|
|
res = get_prediction(teams_a[x], teams_b[x], team_a_games[x], team_b_games[x], "lcs_summer_2020", FS, team_a_win[x], verbose=True)
|
|
|
|
elif x < 35:
|
|
|
|
res = get_prediction(teams_a[x], teams_b[x], team_a_games[x], team_b_games[x], "lec_summer_2021", FS, team_a_win[x], verbose=True)
|
|
|
|
else:
|
|
|
|
res = get_prediction(teams_a[x], teams_b[x], team_a_games[x], team_b_games[x], "ultraliga_summer_2022", FS, team_a_win[x], verbose=True)
|
2023-01-17 21:56:21 +01:00
|
|
|
|
2023-01-31 10:54:42 +01:00
|
|
|
print(f"Prediction: {res}")
|