We covered RNN for MNIST data, and it is actually even more suitable for NLP projects. You can find more details on Valentino Zocca, Gianmario Spacagna, Daniel Slater’s book Python Deep Learning. from __future__ import print_function, division # -*- coding: utf-8 -*- ###”War and peace” contains more than 500,000 words, making it the perfect ###candidate […]

# CNN KeRas (TensorFlow) Example with Cifar10 & Quick CNN in Theano

We will use cifar10 dataset from Toronto Uni for another Keras example. We used this dataset for another CNN model with more detailed process here. You can find more details on Valentino Zocca, Gianmario Spacagna, Daniel Slater’s book Python Deep Learning. ###the cifar10 dataset is comprised of 10 classes of objects: airplanes, automobiles, ###birds, cats, […]

# DNN and CNN of Keras with MNIST Data in Python

We talked about some examples of CNN application with KeRas for Image Recognition and Quick Example of CNN with KeRas with Iris Data. Actually, TensorFlow itself in Python is mature enough to conduct deep learning activities and KeRas is even faster and more simple to train with than TensorFlow only in deep learning activities. You […]

# RANSAC and Nonlinear Regression in Python

We use Python3. More details can be found in Sebastian Raschka’s book: https://www.goodreads.com/book/show/25545994-python-machine-learning?ac=1&from_search=true Find the data here: https://archive.ics.uci.edu/ml/datasets/Housing. Linear regression models can be heavily impacted by the presence of outliers. As an alternative to throwing out outliers, we will look at a robust method of regression using the RANdom SAmple Consensus (RANSAC) algorithm, which is […]

# Preprocess: LDA and Kernel PCA in Python

Principal component analysis (PCA) is an unsupervised linear transformation technique that is widely used across different fields, most prominently for dimensionality reduction. We talked about it here: https://charleshsliao.wordpress.com/2017/05/28/preprocess-pca-application-in-python/ We use the data from sklearn library, and the IDE is Python3. Most of the code comes from Sebastian Raschka’s book: https://www.goodreads.com/book/show/25545994-python-machine-learning?ac=1&from_search=true ###1. import the data ###pls […]

# Setting up jupyter notebook server as service in Ubuntu 16.04

Step 1: Verify the jupyter notebook location: $ ll /home/avkash/.local/bin/jupyter-notebook -rwxrwxr-x 1 avkash avkash 222 Jun 4 10:00 /home/avkash/.local/bin/jupyter-notebook* Step 2: Configure your jupyter notebook with password and ip address as needed and make sure where it exist. We will use this file as configuration for jupyter as service. jupyter config: /home/avkash/.jupyter/jupyter_notebook_config.py Step 3: Create […]

# CNN Model of Image Detection in Keras (TensorFlow) in Python3

This article covers the basic application of Keras and CNN in Python3, with Sublime text3 and Ipython Notebook as IDE. More details of the following code can be found in Robert Layton’s book here: https://www.goodreads.com/book/show/26019855-learning-data-mining-with-python?from_search=true ###The book above said that we will build a system that will take an image as an input ###and give […]

# Keras in Python, Backend TensorFlow, with Iris data to Build Deep Learning Model

We talked about Deep Learning Modeling in TensorFlow in Python&R: https://charleshsliao.wordpress.com/2017/06/06/rnn-in-tensorflow-in-pythonr-with-mnist/ We also mentioned Keras application in R: https://charleshsliao.wordpress.com/2017/04/24/cnndnn-of-keras-in-r-backend-tensorflow-for-mnist/ This article covers the basic application of Keras and TensorFlow in Python3, with Sublime text3 and Ipython Notebook as IDE. More details of the following code can be found in Robert Layton’s book here: https://www.goodreads.com/book/show/26019855-learning-data-mining-with-python?from_search=true ###This […]

# Movie Recommender -Affinity Analysis of Apriori in Python

“Affinity analysis can be applied to many processes that do not use transactions in this sense: Fraud detection Customer segmentation Software optimization Product recommendations. The classic algorithm for affinity analysis is called the Apriori algorithm. ” More details can be found in Robert Layton’s book here: https://www.goodreads.com/book/show/26019855-learning-data-mining-with-python?from_search=true We explored similar method of “Market Basket” here:https://charleshsliao.wordpress.com/2017/03/06/an-quick-association-rules-example-within-r/ […]

# NBA Winning Estimator with Decision Tree in Python

It would be interesting to conduct prediction to understand the trend of NBA winning teams. We will use data from http://www.basketball-reference.com/leagues/NBA_2017_games-june.html and follow workflow. More details can be found in Robert Layton’s book here: https://www.goodreads.com/book/show/26019855-learning-data-mining-with-python?from_search=true ###1. Load data from http://www.basketball-reference.com/leagues/NBA_2017_games-june.html import pandas as pd file=”NBA2017.csv” NBA2017=pd.read_csv(file,sep=”,”,parse_dates=[“Date”]) #change string of “Date” to date value NBA2017.columns=[“Date”, “Start […]