<jupyter_start><jupyter_text><jupyter_code># CLASSIFICATION
%tensorflow_version 1.x
import tensorflow as tf
print(tf.__version__)
from tensorflow import keras
import numpy as np
import matplotlib.pyplot as plt
fashion = keras.datasets.fashion_mnist
(trainimages,trainlabels), (testimages, testlabels) = fashion.load_data()
 
trainimages.shape
len(trainlabels)
len(testlabels)
classes = {0: 'T-shirt/top',
1: 'Trouser',
2: 'Pullover',
3: 'Dress',
4: 'Coat',
5: 'Sandal',
6: 'Shirt',
7: 'Sneaker',
8: 'Bag',
9: 'Ankle boot'}

x = 0
plt.imshow(trainimages[x])
print(classes[trainlabels[x]])
for i in range(10):
  print(classes[trainlabels[i]])

x = 5
plt.figure()
plt.imshow(trainimages[x], cmap='gray')
plt.colorbar()
plt.grid(False)
print(classes[trainlabels[x]])
# Smallest-> 0, Largest-> 255
# Each pixel-> 1 byte-> 2^8-1
# Entire dataset/ largest_num -> 
# smallest/largest-> value>0
# largest/largest-> 1
trainx = trainimages /255.0
testx = testimages/255.0

x = 5
plt.figure()
plt.imshow(trainx[x], cmap='gray')
plt.colorbar()
plt.grid(False)
print(classes[trainlabels[x]])
# Eigenvector => vector to which if you multiply a scalar value-> the vector does NOT change

# y = 1000*w1 + 10*w2 + 0.0003 *w3 + 0.04
# w -> 0..1 
# VERY Large numbers, away from smaller numbers<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15720858895705522, 'fraction_numerical': 0.040644171779141106, 'mean_word_length': 5.492537313432836, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '125663', 'license': 'MIT', 'n_tokens_mistral': 540, 'n_tokens_neox': 497, 'n_words': 128, 'path': '06 grayscale.ipynb', 'repo_name': 'MavrellousG/Azure_ML_DFE', 'size': '1304'}