Estimation of Heart Rate to varying power output in endurance activities.
Report Bug
Table of Contents
Heart rate and power output are two important performance metrics which are used in the world of endurance sports, especially in cycling.
This project focuses on developing and modeling the relationship between heart rate with varying power output.
For this study, we took below steps:
-
Data Extraction : We used web-scraping methodologies to scrap data from one of the popular physical exercise tracking app called Strava.
-
Data Pre-Processing : This step includes cleaning, manipulating, dropping irrelevant attributes and replacing missing data with different methods like Data Profiling, Linear Interpolation, etc. We also implemented our own implementation of segmenting data series to align with pauses taken during the activity.
-
Modeling : This includes applying Least Squares Approximation method, and fmincon in MATLAB to estimate the coefficients of first order differential equation.
To correctly import and run this project locally, please follow below guidelines and instructions for smooth development process.
As mentioned above in the "Built with" section, please have Python installed on your system. You can use homebrew or straightforward Installation for both Python as mentioned on their homepage.
MATLAB comes with its own tool called MATLAB which needs to be a licensed version. You can have it for free if you're registered with a University or your workplace has its licensed copy.
Python can be run and programmed on any IDE like IntelliJ, PyCharm, VS Code, etc.
Below is an example of how you can set up the project on your local machine.
-
For python packages and libraries, refer to the requirements.txt to install all the required packages.
Note : psycopg2 is required to connect to the PostgreSQL database. However, psycopg2 is not available anymore and you will find compile time error. Please install psycopg2-binary instead using pip/pip3 command.
pip3 install psycopg2-binary
-
Install PostgreSQL on your machine for the database. You don't need an altogether a different UI to run queries because your IDE(IntelliJ, VS Code, etc.) will directly give you plugins to access them directly from the IDE. However, in case, you want a separate UI for it, use pgAdmin
-
The athlete ID for which the biking ride activities needs to be collected, must be added in resources/pro-athlete-id.txt
-
The year and week number for which the data needs to be collected must be added in resources/application-config.properties
-
The database credentials must be added in resources/db-config.properties
-
The credentials for the user login to Strava must be added in resources/strava-config.properties.
-
Run the application using the following command
python3 DataCollectRunner.py
-
The model are present in models folder in HR_Model.mlx which needs to be run in MATLAB.
-
Model results can be analysed on MATLAB or src/services/ModelAnalysis.ipynb
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/feature-name
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is developed under the guidance and support of Prof. Dr. Dietmar Saupe, Department of Computer and Information Science, University of Konstanz, Germany.