🥇 2024 Olympic predictor: powered by PyTorch and W&B
This data app shows the PyTorch model that predicts the total Olympic medal count for each country in the next Olympics. The main components include tensors, model training, and evaluation. The app is an easy way to explore the basics of deep learning using real-world data with PyTorch.
Weights and Biases integration
Scheduling jobs and managing execution of experiments tracking improves the connectivity between the details of the work. Overall, W&B helps improve productivity of deep learning studies, shortening the time required for further model development and improving their quality.
The parameters for tracking are as follows:
This data app uses Olympic data up to the 2016 Rio Olympics. After converting key columns to numerical codes and filling missing values, the data is split into training (pre-2016) and testing (2016). SMOTE is applied to balance the training set by oversampling minority classes.
The data is being scaled using StandardScaler, and then converted into PyTorch tensors for use in the neural network.
In the training loop, the model is trained over a specified number of epochs, where the learning rate is dynamically adjusted using a scheduler after each epoch. The training loss and test accuracy are logged to Weights & Biases (W&B) for monitoring and performance evaluation.
The accuracy of this model is quite low. However, this data app serves as a demonstration of using PyTorch and W&B in Deepnote, so this result will suffice.
The output below shows the medal predictions for the 2024 Olympics, with the total number of medals listed for each country. The data was trained on Olympic Games before 2016 and tested on the Rio 2016 Olympics. The comparison between the actual data and the predicted data generated using PyTorch can be seen. The comparison focuses on the total number of medals won by 20 selected countries, specifically those that historically won the most medals.
Additionally, the graph provides a comparison between the actual number of gold medals won by the selected countries and the predicted numbers.