Tuesday, January 30, 2018

How to make the local level model with seasonal effect

Overview

On time-series analytics, we frequently need to think about a recurring pattern. In the context of time-series analytics, a recurring pattern is referred to as a seasonal effect.

For example, please see the image below. This image is the plotting of a time series data. As you can see, it has recurrent pattern.

enter image description here
On this article, I'll make the local level model with seasonal effects on Stan.

Monday, January 29, 2018

Simple trial of various types of time series analytics

By air passengers data, which is typical time-series data, I'll try some time-series analytics methods. Actually, about some points, I'm not sure if it is really appropriate or not. So, if you find some wrong or incorrect points, please let me know.

Sunday, January 28, 2018

How to check autocorrelation on Python

To time series data, we usually check autocorrelation. As a memo, I’ll write down how to get the autocorrelation and the plot of it on Python.

Sunday, January 21, 2018

Anti-pattern of the local level model with explanatory variable

Overview

On this article, I'll try anti-pattern of the local level model with explanatory variable.
Before, on the article, Local level model with explanatory variable to time series data on Stan , I made the local level model with explanatory variable to time series data. From the article, I set the model as followings.



There, I set state disturbances as zero. That’s because on the book, An Introduction to State Space Time Series Analysis (Practical Econometrics), it is written that these state disturbances are usually fixed on zero to establish a stable relationship between and . This time, as experiment, I’ll try the model without setting as zero, meaning I’ll set as changeable.

Saturday, January 20, 2018

Summary of local level model and local linear trend model to time series data

Overview

On this article, I’ll leave the summary about local level model and local linear trend model.
The both models are for time series analysis. Those are too simple to adapt for real data as they are. But those are very fundamental in many cases and by adding some other factors, those can become practical. So, here, I’ll leave rough memos about those.
As a text book, I’m using the following book. This article responds to chapters two and three.




Tuesday, January 16, 2018

Local Linear Trend Model for time series analysis on Stan

Overview

On this article, I’ll make the local linear trend model to artificial time series data by Stan. Before, I made a local level model on Stan on the article, Local level model to time series data on Stan.
By adding the slope variable to that model, I’ll make the local linear trend model.
I used this book as reference.

Monday, January 15, 2018

TensorBoard's graph visualization with tf.variable_scope

Overview

On this article, I’ll write down the note about the example of tf.variable_scope(), meaning how to arrange the graph for TensorBoard.
The target code is from the article below.
On a tensorboard, without using namespace, the graph information becomes complex. Namespace will solve the problem and makes it easy to debug.

Tuesday, January 9, 2018

Edward modeling to an artificial data

Overview

On the article below, I switched method on Edward model from variational method to Hamiltonian Monte Carlo.
As an another example, I'll try same thing to the model of the following article.
In a nutshell, I'll make model for an artificial data and get sample by Hamiltonian Monte Carlo.

Hamiltonian Monte Carlo on TensorFlow and Edward

Overview

On this article, I tried Hamiltonian Monte Carlo algorithm to the simple data by TensorFlow and Edward.
Edward lets us use variational inference, Gibbs sampling and Monte Carlo method. And by relatively small changes, we can switch the methods. So I'll try simple HML model here.
About Hamiltonian Monte Carlo itself, I'll write another article for it.

Monday, January 8, 2018

How to convert a Keras model to a TensorFlow Estimator

Overview

TensorFlow has the the function of converting Keras model to TensorFlow Estimator. On this article, I checked how to use it.
About the TensorFlow Estimator. Please read the article below and official pages.


Anyway, Keras lets us write neural network model relatively easily. But sometimes we need a model following TensorFlow. On this kind of cases, we write the model by Keras at first and after that can convert it to TnsorFlow's one.

Sunday, January 7, 2018

Simple case of tf.keras

Overview

On this article, I rewrote the Keras code by tf.keras. From TensorFlow, we can use Keras by tf.keras. But I had never used this. So I checked and it was very simple and easy.

Wednesday, January 3, 2018

Get started with golearn: Machine Learning with Go

Overview

On this article, I’ll try golearn package on Golang.
These days, typical environment sets for data science and machine learning are Python, R, R-studio and Jupyter, although it depends on the purposes and phases. When I personally do something, I always use Python and Jupyter. But of course other programming languages have machine learning libraries and those are sometimes used.
Here, I’ll try golearn package, which is the package for machine learning.
This is the official page.
As a first step, through kNN algorithms, I’ll follow the basic step of that.

Monday, January 1, 2018

Local level model with explanatory variable to time series data on Stan

Overview

On this article, I'll make the local level model with explanatory variable to time series data on Stan.
Before, I made the simple local level model on Stan. In the practical situation, we frequently need to make model with some explanatory variables. So, I'll make simple local level model with explanatory variables here.
As a reference, I’m using the following book. This article is dealing with the chapter 5 of the book.