Late post today, but for good reason this time! I finally finished off that side project I was working on. My neural net classifier actually works! And it seems to hit benchmarks laid out by other neural networks on publicly available data. Somehow. Anyway there’s not much to this post, I just wanted to show this off:
Sorry that’s so blurry, wordpress doesn’t have great video support it seems. Anyway what you’re looking at there is the model training itself on some data. Each ‘Epoch’ is a complete run through the system as I detailed in last week’s series of posts. Forward pass, backpropagation, and optimization. Then it just does that 15,000 times. Each time the loss falls a little and the accuracy (hopefully) gets a little better. I displayed the loss and accuracy every 100 epochs, but there’s lots of other metrics I can extract from the network in the future. Should be fun to tinker around with now that it’s actually functioning.
After training I ran the model against similar data it had not yet been exposed to. All data was from the UCI Machine Learning repository, an amazing resource for anybody trying to learn about this stuff. The data comes pretty clean, and the site even has benchmarks to check your own classifiers against. I used the heart disease repository, a collection of data that has a ton of features related to heart health, and an indication of whether or not each patient actually had heart issues.
Given several features like exercise patterns, heartrate, family history, etc., my network was able to predict whether someone had a heart disease with an accuracy close to 80%, which is right smack dab in the middle of the benchmark set by other professionally built neural networks.
I honestly can’t believe it actually works.
You can check out the data here if you’re interested.
Thank you for reading,
Benjamin Hawley