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,

Kanyakumari - Kothaiyar Dam, Thiruparappu Falls, Mathur, Kulachekaram, Marthandam, Nagerkovil

Labour Intensive Versus Capital Intensive - Balance

  1. Labour intensive and Capital intensive, Economic policies two ways. Our policy is Mixed, ie., Labour and Capital. Ex. LIC, BHEL, SBI stands testimony to this. This Mixed economy is Unique for our Nation.   2. Adaptation New technology in any organisation, leads to Job Cut. Machine sucks human blood at the back and black side. Hindustan Teleprinters Ltd, Telecom service provider closed operation, since market dynamics changed from Dialed-Wired to Mobile. Nokia 2G enjoyed HTL closure. Years after same HTL closure happens to Nokia by the invention of " Touch Technology" and Korean SamSung Galaxy picked the Lion-Share of Market. 3. AI, Cloud, ML, 5G growth, we have to pay the heavy PRICE for adaptation to NEW INVENTIONS. Labours of HTL, Labours of Nokia not at the age group of 50's but 30's.   4. 5G RISKS    4. Any MNC, moving to 5G at the cost of Labours Job first. Thatz they claim as Optimized to $100 million is saving by moving to CLOUD. Black-side ...