Skip to content

This project focuses on predicting the number of Olympic medals that specific countries are likely to win in upcoming Olympic events.

Notifications You must be signed in to change notification settings

ArpanSurin/Olympic-Medals-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Olympic Medals Prediction

This project aims to predict the number of medals each country will earn in the Olympic Games using historical data and statistical analysis.

Table of Contents

Introduction

Predicting Olympic medal counts is a complex challenge that involves various factors, including past performance, athletes' demographics, and historical context. This project leverages statistical methods in Python to analyze these factors and make predictions for upcoming Olympic Games.

Data

The dataset comprises several features, including:

  • team: The team code for the country.
  • country: The full name of the country.
  • year: The year of the Olympic Games.
  • athletes: Number of athletes representing the country.
  • age: Average age of athletes.
  • prev_medals: Number of medals won in previous Olympics.
  • medals: Actual medals won in the Olympics.
  • predictions: Predicted medals based on the model.

Sample Data

team country year athletes age prev_medals medals predictions
AFG Afghanistan 2012 6 24.8 1 1 0
ALB Albania 2012 10 25.7 0 0 0

Methods

The analysis utilizes the following methods:

  1. Calculation of absolute errors between predicted and actual medals.
  2. Grouping errors by team to assess average prediction accuracy.
  3. Analysis of error ratios based on historical medal counts.

The code snippets demonstrating some calculations include:

errors = (test["medals"] - test["predictions"]).abs()  
error_by_team = errors.groupby(test["team"]).mean()  
medals_by_team = test["medals"].groupby(test["team"]).mean()  
error_ratio = error_by_team / medals_by_team  

Analysis

The resulting error ratios indicate how well the model predicts for each team. A lower error ratio signifies better prediction accuracy. Various statistics and visualizations are analyzed to enhance understanding.

About

This project focuses on predicting the number of Olympic medals that specific countries are likely to win in upcoming Olympic events.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published