This is the code for the gender classification challenge for 'Learn Python for Data Science #1' by @Sirajology on YouTube. The code uses the scikit-learn machine learning library to train a decision tree on a small dataset of body metrics (height, width, and shoe size) labeled male or female. Then we can predict the gender of someone given a novel set of body metrics.
Install missing dependencies using pip
Once you have your dependencies installed via pip, run the script in terminal via
python demo.py
Find 3 more classifiers from the sci-kit learn documentation and add them to the demo.py code. Train them on the same dataset and compare their results. You can determine accuracy by trying to predict testing you trained classifier on samples from the training data and see if it correctly classifies it. Push your code repository to github then post it in the comments. I'll give the winner a shoutout a week from now!
Credits for some of the code go to chribsen. I've merely created a wrapper to get people started easily.