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.





Saturday, December 30, 2017

Time series analysis to predict future points on Stan

Overview

Before, I made the simple local level model to time series data. At that article, I just showed the sampled points traced the data. This time, I also do sampling to predict the following points of the data.

enter image description here

Roughly, on the image above, the blue points are data you already have and the red points are the predict target. The purpose of this article is to make model by blue points, data and predict red points, the values of future.

Thursday, December 28, 2017

Local level model to time series data on Stan

Overview

On the articles below, I tried local level modeling to time series data on Edward and am still struggling.

Time series analysis on TensorFlow and Edward: local level model

Deep learning and Machine learning methods blog


Time series analysis on TensorFlow and Edward: local level model:P.S. 1

On the article below, I tried to analyze time series data with local level model. On Stan, I could do it before without problem. But on Edward and TensorFlow, I have been struggling. Deep learning and Machine learning methods blog From the situation above, although it doesn't work well yet, I got some progress.


On this article, I’ll express by Stan what I wanted on Edward. In a nutshell, I’ll write local level model to time series data on Stan.

Wednesday, December 27, 2017

Time series analysis on TensorFlow and Edward: local level model:P.S. 1

Overview

On the article below, I tried to analyze time series data with local level model. On Stan, I could do it before without problem. But on Edward and TensorFlow, I have been struggling.

Time series analysis on TensorFlow and Edward: local level model

Deep learning and Machine learning methods blog


From the situation above, although it doesn’t work well yet, I got some progress.

Monday, December 25, 2017

Time series analysis on TensorFlow and Edward: local level model

Overview

To review the time series analysis from the basic points, I tried to do state space modeling with TensorFlow and Edward. And I’m at a loss.
The main purposes are these two.

  • review the time series analysis from the basic points
  • try to check how to do that on Edward and TensorFlow


Monday, December 18, 2017

Classification by deep neural network using tf.estimator of TensorFlow

Overview

On the article below, I checked how to write deep neural network by tf.estimator. But it was regression case.


tf.estimator of TensorFlow lets us concisely write deep neural network

On this article, I'll re-write the simple deep neural network model to iris data by tf.estimator. From official page, TensorFlow's high-level machine learning API (tf.estimator) makes it easy to configure, train, and evaluate a variety of machine learning models. By comparing with the original code, I'll check how much it becomes concise and how to use tf.estimator.
Here, just in case, I’ll check the classification case. This is totally same as the official page’s tutorial and actually, the difference between regression and classification about the aspect of code is quite few. But classification and regression are one of the most basic tasks on machine learning and data science. So I’ll do it by myself.

Sunday, December 17, 2017

tf.estimator of TensorFlow lets us concisely write deep neural network

Overview


On this article, I’ll re-write the simple deep neural network model to iris data by tf.estimator. From official page,
TensorFlow’s high-level machine learning API (tf.estimator) makes it easy to configure, train, and evaluate a variety of machine learning models.
By comparing with the original code, I’ll check how much it becomes concise and how to use tf.estimator.

Saturday, December 9, 2017

Simple example of how to use TensorBoard

Overview


On this article, through the simple regression, I’ll show how to observe the parameter’s behavior on TensorBoard.

TensorBoard is cool visualizing tool and by using it, our debug to model can be easier.

Thursday, December 7, 2017

How to use TensorBoard through arithmetic calculation on TensorFlow

Overview

Through basic arithmetic operations, let’s check how those are expressed on TensorBoard.

It has two main points.
One, check the main calculation function on TensorFlow.
Two, check how it is expressed on TensorBoard.

TensorFlow deals with Tensor, leading us to use TensorFlow’s methods for mathematical operations. Simply, here, I’ll use some of them. And, TensorBoard is the tool to check the graph and other information graphically. As a simple check, I’ll show how those operations are expressed visually on that.


Friday, December 1, 2017

Edward modeling to artificial data with random effects

Overview

By Edward, I’ll try to make the model with random effect.
There are some ways to fulfill that. On this article, I’ll follow the style that the Edward tutorial takes.

Sunday, November 26, 2017

Fashion-MNIST exploring using Keras and Edward

Overview

On the article, Fashion-MNIST exploring, I concisely explored Fashion-MNIST dataset.

We can get access to the dataset from Keras and on this article, I’ll try simple classification by Edward.

Tuesday, November 14, 2017

Simple Baysian Neural Network with Edward

Overview

Edward can enable us to convert TensorFlow code to Baysian one. I’m not used to Edward. So for the training, I’m tackling with converting some TensorFlow code to Edward one. On this article, I tried to convert simple neural network model to Baysian neural network one.

The purpose of this article is to convert the TensorFlow code I posted before to Baysian one by Edward.

Baysian neural network model

By Edward, we can relatively easily convert the model using TensorFlow to probabilistic one.
The regression model for iris data is from the article below.

Simple regression model by TensorFlow

Neural network is composed of input, hidden and output layers. And the number of hidden layers is optional. So the simplest network architecture has just one hidden layer. On this article, I'll make the simplest neural network for regression by TensorFlow.


In a nutshell, the model is to predict one target value from three features. About the details, please check the article.

Friday, November 10, 2017

Simple regression by Edward: variational inference

Overview

Edward is one of the PPL(probabilistic programming language). This enables us to use variational inference, Gibbs sampling and Monte Carlo method relatively easily. But it doesn’t look so easy. So step by step, I’ll try this.

On this article, simple regression, tried on the article Simple Bayesian modeling by Stan, can be the nice example. So I did same things by Edward, using variational inference.