Logistic Regression is the basic concept of recent "Deep" neural network models. I rechecked TensorFlow L.R. coding to classify IRIS dataset.
- Binary Classification problem - iris_lr.py
- Multi-class Classification problem - iris_lr_softmax.py
# | |
# adult_LR_classifier.py date. 10/17/2015 | |
# SGD (Stochastic Gradient Descent) version | |
# consider 3 features of dataset | |
# | |
import numpy as np | |
import numpy.random as rng | |
import matplotlib.pyplot as plt | |
import scipy as sp |
Date | Open | High | Low | Close | |
---|---|---|---|---|---|
2014/12/31 | 17702.11914 | 17713.75977 | 17450.76953 | 17450.76953 | |
2014/12/30 | 17702.11914 | 17713.75977 | 17450.76953 | 17450.76953 | |
2014/12/29 | 17914.55078 | 17914.55078 | 17525.66016 | 17729.83984 | |
2014/12/26 | 17778.91016 | 17843.73047 | 17769.00977 | 17818.96094 | |
2014/12/25 | 17804.83984 | 17832.4707 | 17773.58984 | 17808.75 | |
2014/12/24 | 17842.03906 | 17875.41016 | 17800.41992 | 17854.23047 | |
2014/12/22 | 17685.5293 | 17692.58008 | 17572.61914 | 17635.14062 | |
2014/12/19 | 17511.00977 | 17621.40039 | 17471.59961 | 17621.40039 | |
2014/12/18 | 17210.05078 | 17210.05078 | 17210.05078 | 17210.05078 |
# | |
# mnist_cnn_bn.py date. 5/21/2016 | |
# date. 6/2/2017 check TF 1.1 compatibility | |
# | |
from __future__ import absolute_import | |
from __future__ import division | |
from __future__ import print_function | |
import os |
These codes are TensorFlow Autoencoder implementation examples. They are inspired by very educational Keras Blog article.
http://blog.keras.io/building-autoencoders-in-keras.html
Building Autoencodes in Keras
"Autoencoding" is a data compression algorithm where the compression and decompression
# | |
# tf_logistic_reg.py | |
# date. 11/18/2015 | |
# date. 1/29/2017 - checked under tensorflow 0.12.1 | |
# | |
# The baseline is the code for 'Theano'. | |
from __future__ import print_function | |
import numpy as np |
The original codes comes from "Coursera Machine Learning" by prof. Andrew Ng, the program assignment of week 9.
I implemented this by Python,
1.Numpy + Scipy.Optimize
2.TensorFlow