Reader small image

You're reading from  Statistics for Machine Learning

Product typeBook
Published inJul 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781788295758
Edition1st Edition
Languages
Concepts
Right arrow
Author (1)
Pratap Dangeti
Pratap Dangeti
author image
Pratap Dangeti

Pratap Dangeti develops machine learning and deep learning solutions for structured, image, and text data at TCS, analytics and insights, innovation lab in Bangalore. He has acquired a lot of experience in both analytics and data science. He received his master's degree from IIT Bombay in its industrial engineering and operations research program. He is an artificial intelligence enthusiast. When not working, he likes to read about next-gen technologies and innovative methodologies.
Read more about Pratap Dangeti

Right arrow

ANN classifier applied on handwritten digits using scikit-learn


An ANN classifier example has been illustrated with the handwritten digits example from the scikit-learn datasets, in which handwritten digits are created from 0 to 9 and their respective 64 features (8 x 8 matrix) of pixel intensities between 0 and 255, as any black and white (or grayscale) image can be represented. In the case of color images, RGB (red, green, and blue) channels will be used to represent all the colors:

# Neural Networks - Classifying hand-written digits  
>>> import pandas as pd 
>>> from sklearn.datasets import load_digits 
>>> from sklearn.cross_validation import train_test_split 
>>> from sklearn.pipeline import Pipeline 
>>> from sklearn.preprocessing import StandardScaler 
 
>>> from sklearn.neural_network import MLPClassifier 
>>> digits = load_digits() 
>>> X = digits.data 
>>> y = digits.target 

# Checking dimensions...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Statistics for Machine Learning
Published in: Jul 2017Publisher: PacktISBN-13: 9781788295758

Author (1)

author image
Pratap Dangeti

Pratap Dangeti develops machine learning and deep learning solutions for structured, image, and text data at TCS, analytics and insights, innovation lab in Bangalore. He has acquired a lot of experience in both analytics and data science. He received his master's degree from IIT Bombay in its industrial engineering and operations research program. He is an artificial intelligence enthusiast. When not working, he likes to read about next-gen technologies and innovative methodologies.
Read more about Pratap Dangeti