Skip to content

Commit

Permalink
Merge pull request #4 from lalutir/Dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
lalutir authored Jun 23, 2024
2 parents e546182 + 7cd4585 commit 50da82d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 deletions.
5 changes: 1 addition & 4 deletions Football match predictions/Predictions ECS.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,7 @@ def find_last_created_file(directory):

# Define the hyperparameters
param_grid = {
'regressor__n_estimators': [100, 200],
'regressor__max_depth': [None, 10, 20],
'regressor__min_samples_split': [2, 5, 10],
'regressor__min_samples_leaf': [1, 2, 4]
'regressor__n_estimators': range(0, 1001, 100)
}

# Perform the grid search
Expand Down
5 changes: 1 addition & 4 deletions Football match predictions/Predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,7 @@ def find_last_created_file(directory):

# Define the hyperparameters
param_grid = {
'regressor__n_estimators': [100, 200],
'regressor__max_depth': [None, 10, 20],
'regressor__min_samples_split': [2, 5, 10],
'regressor__min_samples_leaf': [1, 2, 4]
'regressor__n_estimators': range(0, 1001, 100)
}

# Perform the grid search
Expand Down
19 changes: 6 additions & 13 deletions Football match predictions/Predictions_Accuracy_Results.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 15,
"metadata": {},
"outputs": [
{
"ename": "ValueError",
"evalue": "invalid literal for int() with base 10: ''",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[4], line 77\u001b[0m\n\u001b[0;32m 74\u001b[0m df2 \u001b[38;5;241m=\u001b[39m pd\u001b[38;5;241m.\u001b[39mread_excel(last_file, sheet_name\u001b[38;5;241m=\u001b[39maway_team)\u001b[38;5;241m.\u001b[39mdrop([\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mIndex\u001b[39m\u001b[38;5;124m'\u001b[39m], axis\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m1\u001b[39m)\n\u001b[0;32m 76\u001b[0m \u001b[38;5;66;03m# Ask for the amount of players in each position\u001b[39;00m\n\u001b[1;32m---> 77\u001b[0m to_predict_home_defenders \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mint\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;28;43minput\u001b[39;49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mHome defenders: \u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m 78\u001b[0m to_predict_home_midfielders \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mint\u001b[39m(\u001b[38;5;28minput\u001b[39m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mHome midfielders: \u001b[39m\u001b[38;5;124m'\u001b[39m))\n\u001b[0;32m 79\u001b[0m to_predict_home_attackers \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mint\u001b[39m(\u001b[38;5;28minput\u001b[39m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mHome attackers: \u001b[39m\u001b[38;5;124m'\u001b[39m))\n",
"\u001b[1;31mValueError\u001b[0m: invalid literal for int() with base 10: ''"
"name": "stdout",
"output_type": "stream",
"text": [
"Predicted score: Netherlands 1 - 2 Austria\n"
]
}
],
Expand Down Expand Up @@ -168,10 +164,7 @@
"\n",
"# Define the hyperparameters\n",
"param_grid = {\n",
" 'regressor__n_estimators': [100, 200],\n",
" 'regressor__max_depth': [None, 10, 20],\n",
" 'regressor__min_samples_split': [2, 5, 10],\n",
" 'regressor__min_samples_leaf': [1, 2, 4]\n",
" 'regressor__n_estimators': range(0, 1001, 100)\n",
"}\n",
"\n",
"# Perform the grid search\n",
Expand Down

0 comments on commit 50da82d

Please sign in to comment.