MNIST with Kaggle Kernel

Hi

 

Today, I’d like to share a quick post. As you already know, Kaggle is the place to study and learn machine learning. Kaggle’s users share their solutions and insights for several problems in ML. How can they share so many information in an easy and practical way? Users share their knowledge through kernels, how it looks like? Let’s take a look?

 

Kaggle Kernel

From Kaggle:

 

Scripts are short snippets of code that do individual tasks, but what we have created is something more. Kernels are a combination of environment, input, code, and output – all stored together for every version you create. By storing all of these attributes together Kernels are fundamentally reproducible, easy to share, and easy to learn from or fork. Kernels contain both the code needed for an analysis, and the analysis itself.

 

In my opinion the idea of kernel is really a great one. Now we have a platform where we can write scripts, add data and a kind of a wiki to explain the algorithm, examine data, plot graphics and share our knowledge in one place! On top of that, you don’t need to fork locally or set up your machine to make small tests, everything can be done in your browser. You can develop your code in Python or R (which by the way I’m studying). By the way, you can fork someone’s else kernel, modify, improve, run it again and share for others!

There is two types of kernels: Script and Notebook. The image below explains pretty much when chose one or another.

 

Figure 1 – Types of Kernel

 

For this post, I created a notebook where I implemented the same multi class logistic regression for the MNIST dataset. Remember that we used the very same dataset for our posts and then we’ll be able to compare results. The link for the kernel is here.

 

Conclusion

 

After run the kernel, our classifier’s accuracy is 87.84%. In Octave we had 87.50% without regularization and 87.75% with some regularization both close to the 87.84%.

 

Figure 2 – Kernel accuracy

 

So we can see that the kernel is a very good tool to make some prototypes, testings and place to learn and share knowledge.

Bye and until next time!

 

Marcelo Jo

Marcelo Jo is an electronics engineer with 10+ years of experience in embedded system, postgraduate in computer networks and masters student in computer vision at Université Laval in Canada. He shares his knowledge in this blog when he is not enjoying his wonderful family – wife and 3 kids. Live couldn’t be better.

LinkedIn 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.