Skip to content
A machine learning program that recommends weights to lift based on the user's personal fitness data
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
bicep_curl_march_2018.csv
regression.py

README.md

WeightTrainer

A machine learning program that recommends weight lifting metrics based on the user's past lifting data

Overview

I was inspired to make WeightTrainer when I first went to the gym and had no clue about which weight to lift. After experimenting a few times, I found a weight that I felt comfortable lifting; however I was also not sure of when I should increase my weight. I decided to build this program to tackle those uncertainties, help users make better informed decisions about the weights they lift at the gym, and apply what I learned from my statistics courses as well as Andrew Ng's Machine Learning Course.

This program will take in a csv file of your workout progress, and a number (the number of days since you started working out) and it will generate a personal suggestion about the weight you should lift based on your workout history.

Getting Started

First, cd into the directory where you would like to download this program.

Then,

git clone https://github.com/kinericenergy/WeightTrainer.git

Next, cd WeightTrainer

Here, you can use the following command to generate your weight suggestion.

python regression.py bicep_curl_march_2018.csv 28

In this command, I specified the csv file to read my workout data from, which is "bicep_curl_march_2018.csv", and I specified a number, which is the number of dates since I started working out. In my example, I am predicting my 28th day of my workout.

Here is what it looks like:

weighttrainercmd

As you can see, my program suggested that I lift 3 sets of 10 reps using 69 lbs for my upcomming/28th workout (which is pretty close to my usual lifting metrics).

If you would like to use this program for yourself, you can create your own csv file of the same format as my "bicep_curl_march_2018.csv" and input your workout data instead. Then, you can pass your csv name with the workout number you would like to weight predictions for. Note, your workout does not have to be limited bicep curls. If you would like to have suggestions for other workouts, you can make additional csv files and run those files with program. How great!

And there you have it, you have completed setting up WeightTrainer :)

Credits

This program was made through following llSourcell's tutorial. Additional features such as reading various csv files, calculations for weight suggestion, and adjustments to the linear modeling of the problem were added to increase flexibility, reduce error, and enhance prediction.

  • CS 229 Stanford University (Andrew Ng)
  • llSourcell/linear_regression_live
  • mattnedrich/GradientDescentExample
You can’t perform that action at this time.