Skip to content

Instantly share code, notes, and snippets.

@orazdow
Created January 22, 2020 11:11
Show Gist options
  • Save orazdow/fdde5f7164fdd56ae83a0ef8e7065688 to your computer and use it in GitHub Desktop.
Save orazdow/fdde5f7164fdd56ae83a0ef8e7065688 to your computer and use it in GitHub Desktop.
mnist
import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import load_digits
from sklearn.linear_model import LogisticRegression
digits = load_digits()
fig, ax = plt.subplots(2, 5)
plt.gray()
a = 0
for row in ax:
for col in row:
col.title.set_text(digits.target[a])
col.matshow(digits.images[a])
col.axis('off')
a += 1
plt.show()
logreg = LogisticRegression(c=1000, solver='saga', multi_class='multinomial')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment