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 […]

# 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 […]

# 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 […]

# Preprocess: t-SNE in Python

We use the data from sklearn library, and the IDE is sublime text3. Most of the code comes from the book: https://www.goodreads.com/book/show/32439431-introduction-to-machine-learning-with-python?from_search=true ###There is a class of algorithms for visualization called manifold learning algorithms ###which allows for much more complex mappings, and often provides better visualizations compared with PCA. ###A particular useful one is the […]

# Preprocess: PCA Application in Python

We use the data from sklearn library, and the IDE is sublime text3. Most of the code comes from the book: https://www.goodreads.com/book/show/32439431-introduction-to-machine-learning-with-python?from_search=true ###sometimes we might face the situation that the features or vars in the data are not separate from each other ###We can always observe that data before we can even preprocess it with […]

# Preprocess in Python-Scale

We use the data from sklearn library, and the IDE is sublime text3. Most of the code comes from the book: https://www.goodreads.com/book/show/32439431-introduction-to-machine-learning-with-python?from_search=true ###Preprocess methods ###The StandardScaler in scikit-learn ensures that for each feature, the mean is zero, ###and the variance is one, bringing all features to the same magnitude. However, ###this scaling does not ensure […]

# Recommenders in R, Comparing Multiple Algorithms

We know several essential recommenders’ methods. If we want to recommend ourselves a book, we can do it 1. Based on our own exp 2. Based on our friends friends exp 3. Based on the catalog of the library 4. Based on the search engine’s result We already talked a little about the first method […]

# Multi Layer Perceptrons in Python

You can see more about MLP in R here:https://charleshsliao.wordpress.com/2017/04/10/tune-multi-layer-perceptron-mlp-in-r-with-mnist/ Generally speaking, a deep learning model means a neural network model with more than just one hidden layer. Whether a deep learning model would be successful depends largely on the parameters tuned. We use the data from sklearn library, and the IDE is sublime text3. Most […]

# Ensemble with Gradient Boosting in Python

We use the data from sklearn library, and the IDE is sublime text3. Most of the code comes from the book: https://www.goodreads.com/book/show/32439431-introduction-to-machine-learning-with-python?from_search=true from sklearn.ensemble import GradientBoostingClassifier import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.datasets import load_breast_cancer cancer=load_breast_cancer() X_train, X_test, y_train, y_test = train_test_split( cancer.data, cancer.target, random_state=0) ###Gradient boosted regression trees is another ensemble […]