Created
January 22, 2020 11:11
-
-
Save orazdow/fdde5f7164fdd56ae83a0ef8e7065688 to your computer and use it in GitHub Desktop.
mnist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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