Skip to main content

Machine Learning Keras, Tensorflow source code for MNIST Dataset

 70,000 MNIST Hand  Writing Recognition - Logistic Regression 


from sklearn.datasets import fetch_openml
mnist = fetch_openml('mnist_784')
x,y = mnist['data'],mnist['target']


x,y = mnist['data'], mnist['target']

import matplotlib.pyplot as plt

some_digit = x_test[2813]
some_digit_image = some_digit.reshape(28,28)
 
plt.imshow(some_digit_image)
 
x_train, x_test = x[:60000], x[60000:]
y_train, y_test = y[:60000], y[60000:]


import numpy as np
shuffle_index = np.random.permutation(60000)
x_train, y_train = x_train[shuffle_index], y_train[shuffle_index]
 
 
from sklearn.linear_model import LogisticRegression

clf = LogisticRegression()
clf.fit(x_train, y_train)
 
some1 = x_test[2813]
some1.reshape(28,28)
clf.predict([some1]) 
 
Colab Notebook Link: 
 
 
 
 

Comments

Popular posts from this blog

All India - Kedarnath, Kasi Viswanath, Badrinath, Jagnath, Dhuvaraga, Amristar, Madurai, Kancheepuram, Tirumalai,

Mannar Sami Temple

Our Favourite Cloud Platform - HEROKU , a SalesForce Company

 Table of Contents 1. Desktop Softwares 1.1. Git Download 1.2 Heroku CLI Download 2. Dayam on Heroku 3. Arcot Kathir on Heroku 4. Arcot Yellow Pages on Heroku 1. Desktop Softwares 1.1. Git Command Line Desktop application 1.2  Heroku Cloud command line Desktop   2. Dayam My full fledged HTML5/JavaScript/CSS3/PHP Web application as SaaS. Dayam Software as a Service      3. Simple Web page Hosting Arcot Kathir Technologies    4.  Facebook Application - Social Touch - Arcot Yellow Pages Arcot Yellow Pages for Business   My Full fledged, Social application with Facebook Friends Sharing Feature.