Skip to content

Commit

Permalink
Merge pull request #68 from nickpadd/develop
Browse files Browse the repository at this point in the history
Merge develop
  • Loading branch information
nickpadd authored Feb 26, 2024
2 parents 2c8a767 + 6dfcf5b commit 7d7b134
Show file tree
Hide file tree
Showing 13 changed files with 194 additions and 336 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/script_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ jobs:
#----------------------------------------------
# run updates
#----------------------------------------------
- name: Run updates script
run: |
source $VENV
python run_updates.py
#- name: Run updates script
# run: |
# source $VENV
# python run_updates.py

#----------------------------------------------
# run predictions
Expand Down
2 changes: 1 addition & 1 deletion Predictions/EPL/InteractiveFigure.html

Large diffs are not rendered by default.

504 changes: 187 additions & 317 deletions Predictions/EPL/PredictionTable.html

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions europeanfootballleaguepredictor/common/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ def load_configuration_class(self, config_data) -> dataclass:
module_path = 'sklearn.svm'
regressor_module = importlib.import_module(module_path)
regressor = getattr(regressor_module, config_data['model']['regressor'])
if config_data['model']['regressor'] == 'XGBRegressor':
module_path = 'xgboost'
regressor_module = importlib.import_module(module_path)
regressor = getattr(regressor_module, config_data['model']['regressor'])

self.config = Configuration(
league= config_data['league'],
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion europeanfootballleaguepredictor/data/bookmaker_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, url: str, dictionary: dict):
"""
self.result_url, self.over_under_url, self.btts_url = BookmakerScraper.produce_urls(url)
self.dictionary = dictionary
self.driver = uc.Chrome(version_main = 120)
self.driver = uc.Chrome(version_main = 122)

@staticmethod
def produce_urls(base_url: str):
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from sklearn.linear_model import PoissonRegressor
from sklearn.preprocessing import MinMaxScaler
from loguru import logger
import xgboost
import json

class FootballPredictor(BaseModel):
Expand Down
Binary file not shown.
7 changes: 1 addition & 6 deletions predictor_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import importlib
import os
import argparse
import xgboost
from europeanfootballleaguepredictor.data.database_handler import DatabaseHandler


Expand Down Expand Up @@ -39,10 +38,6 @@ def league_predictions_figure(league_name, regressor_str, matchdays_to_drop, lon
module_path = 'sklearn.svm'
regressor_module = importlib.import_module(module_path)
regressor = getattr(regressor_module, regressor_str)
if regressor_str == 'XGBRegressor':
module_path = 'xgboost'
regressor_module = importlib.import_module(module_path)
regressor = getattr(regressor_module, regressor_str)

parser = argparse.ArgumentParser()
parser.add_argument("--config", type=str, help="Path to the configuration file (e.g., config.yaml)", default='europeanfootballleaguepredictor/config/config.yaml')
Expand Down Expand Up @@ -78,7 +73,7 @@ def main():
with gr.Blocks() as iface:
with gr.Row():
drop1 = gr.Dropdown(['EPL', 'Bundesliga', 'Ligue_1', 'La_Liga', 'Serie_A'], label="Select League")
drop3 = gr.Dropdown(['LinearRegression', 'PoissonRegressor', 'SVR', 'XGBRegressor'], label="Select regressor Type")
drop3 = gr.Dropdown(['LinearRegression', 'PoissonRegressor', 'SVR'], label="Select regressor Type")
with gr.Row():
with gr.Column(scale=1, min_width=600):
slide1 = gr.Slider(minimum=0, maximum=10, step=1, value=4, show_label=True, interactive=True, label="Select number of matchdays to drop")
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ matplotlib = "^3.8.1"
seaborn = "^0.13.0"
mlflow = "^2.8.0"
gradio = "^4.7.1"
xgboost = "^2.0.3"
ipykernel = "^6.29.2"
selenium = "^4.17.2"
undetected-chromedriver = "^3.5.4"
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,5 @@ websocket-client==1.6.4 ; python_version >= "3.9" and python_version < "4.0"
websockets==11.0.3 ; python_version >= "3.9" and python_version < "4.0"
werkzeug==3.0.1 ; python_version >= "3.9" and python_version < "4.0"
win32-setctime==1.1.0 ; python_version >= "3.9" and python_version < "4.0" and sys_platform == "win32"
xgboost==2.0.3 ; python_version >= "3.9" and python_version < "4.0"
yarl==1.9.3 ; python_version >= "3.9" and python_version < "4.0"
zipp==3.17.0 ; python_version >= "3.9" and python_version < "4.0"

0 comments on commit 7d7b134

Please sign in to comment.