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”.



Monday, July 31, 2017

How to use gonum/matrix (Golang package)

When I started to learn about Golang, the first obstacle to use that for machine learning was matrix data manipulation. On Python, you can use numpy, pandas. On Go, on some machine learning package uses gonum/matrix. So I just checked how to use.

Overview

I make a summary about gonum/matrix’s basic usage.

Monday, July 24, 2017

Understand how to use keras's functional API

Overview


keras is awesome tool to make neural network. Being compared with Tensorflow, the code can be shorter and more concise. If you want to enter the gate to neural network, deep learning but feel scary about that, I strongly recommend you use keras.

keras has two types of writing ways. Here I introduce one of them, functional API.



Sunday, July 16, 2017

How Dropout works on Neural Network

Overview

Dropout is one of the good techniques to make good neural network model. The system of it is very simple.

Wednesday, July 5, 2017

Perceptron from scratch

Overview


There are good libraries to make machine learning model and usually, it’s enough to use those to attain the goal you set on the model.

It’s not necessary to write algorithm by yourself. To say precisely, to write and use your full-scratch written model makes more bugs than prevalent library’s one. So you should use prevalent libraries except for the time that those don’t fulfill what you want to get.

But to deepen your understandings and knowledge to machine leaning, writing existing algorithm by yourself is very good trial.
Here, I show how to write perceptron algorithm.

Saturday, July 1, 2017

Practical hack to make deep learning model

Overview

Neural network has a lot of flexibility in its design. You can choose and set many components and options. Because of that, to make more optimized network, you need to know and care about the procedures to adjust those to update your network efficiently.
Here, I arranged neural network’s components and in which procedure those should be adjusted.

Thursday, June 29, 2017

Re-try CNN + KNN model

Overview

When I tried CNN + KNN model before, the training epoch was not enough(50) to check the characteristics. This time I trained 200 epoch on the CNN phase.

Wednesday, June 28, 2017

Simple guide to Neural Network

What is Neural network?

Neural network is an algorithm which make input go through at least one hidden and output layers to output.
Graphically it is like below.