Friday, October 23, 2015

Visualizing popular machine learning algorithms

I put together an experiment to compare different classification machine learning algorithms in real time to gain insight into which ones handle certain situations better than others:

Currently the algorithms covered are:
  • Linear regression (with cubic expansion on feature space)
  • Logistic regression (with cubic expansion on feature space)
  • Neural network (sigmoidal feed forward back propagation)
  • K nearest neighbor (where k=5)
  • Naive bayes
  • Support vector machine (gauss kernel)
  • Discriminate analysis
The bottom dropdown has a few simple datasets but you can also click on the classification space to add new blue/orange points.

As the algorithm trains you'll see the background color morph to display the classification boundary. Change the algorithm (via the dropdown on the top) and see how it impacts the classification boundary.


Heri said...

Good work. You might want to look here

What is the nerdy.js library? There's only the minified version in the fiddle


Wybiral said...

Hey, thanks. Nerdy.js is a Javascript library I put together years ago to implement the concept of datasets and machine learning algorithms. It was built using NumericJS ( to handle the matrix operations.

I've thought about polishing it a bit and releasing it to the open source community, but I'm not sure what kind of demand there is for machine learning in Javascript.