Wednesday, August 30, 2017

How to make Fine tuning model by Keras

Overview

Fine-tuning is one of the important methods to make big-scale model with a small amount of data.

Usually, deep learning model needs a massive amount of data for training. But it is not always easy to get enough amount of data for that. To be added, in many cases, it takes much time to make model from the viewpoint of training. I know you don’t like to see one epoch of training using the time from sunrise to sunset. In some areas like image classification, you can use fine-tune method to solve this situation.

For example, when you try to make image classification model, very deep CNN model works well(sometimes and other time not). To make that kind of model, it is necessary to prepare a huge amount of data. However, by using the model trained by other data, it is enough to add one or some layers to that model and train those. It saves much time and data.

Here, I show this type of method, fine-tuning, by Keras.

Friday, August 25, 2017

Data visualization by Golang

Overview

Usually when I plot data’s behavior to check it and to decide the approach, I use Python, matplotlib. Actually these days this is one of the best answer from the viewpoint of data science. But for these 3 or 4 weeks, I have been using Go and as a data scientist, I feel obligation to know how to plot data even at a basic level.
This is basic plot note about Golang.

Sunday, August 20, 2017

Speed up naive kNN by the concept of kmeans

Overview

About prediction, kNN(k nearest neighbors) is very slow algorithm, because it calculates all the distances between predict target and training data point on the predict phase.
By adding some process, I tried to make the naive kNN speed up and checked how much the time and accuracy changes.

Sunday, August 13, 2017

kNN by Golang from scratch

Overview

I wrote kNN(k nearest neighbors), one of the machine learning algorithms, by Go.
Go has some machine learning packages but it is hard to find the information of how to write machine learning algorithms by Go. So I stepwise introduce how to. This time kNN.
This article is to understand how the algorithm. So I don’t use some elements to improve the accuracy if it disturbs the understanding essential points.

Saturday, August 12, 2017

kmeans by Golang from scratch

Overview


Here, I introduced how to write kmeans, one of the machine learning algorithms, on Go. I’m almost new to Go and this is coding exercise for me through machine learning algorithms.
Go has some machine learning packages. But I couldn’t find the information about how to write machine learning algorithms from scratch. So, I stepwise introduce those.
Those I write here is not for practical use but for understanding algorithms by reading and writing, leading me to set priority on making the code simpler by sacrificing accuracy-improving elements if those are not very easy.

Saturday, August 5, 2017

Perceptron by Golang from scratch

Overview

I tried perceptron, almost “Hello world” in machine learning, by Golang.
Go has matrix calculation library like numpy on Python. But this time I just used default types.

Usually on machine leaning, R and Python are frequently used and almost all from-scratch code of machine learning is shown by those or by C++. So I just tried this “Hello world”.