<jupyter_start><jupyter_text>Logistic Regression: Multiclass Classification<jupyter_code>from sklearn.datasets import load_digits
%matplotlib inline
import matplotlib.pyplot as plt
digits=load_digits()
plt.gray()
for i in range(5):
    plt.matshow(digits.images[i])
dir(digits)
digits.data[0]
from sklearn.linear_model import LogisticRegression
model = LogisticRegression()
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(digits.data,digits.target, test_size=0.2)
model.fit(X_train, y_train)
model.score(X_test, y_test)
model.predict(digits.data[0:5])
y_predicted = model.predict(X_test)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10385756676557864, 'fraction_numerical': 0.008902077151335312, 'mean_word_length': 8.926470588235293, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '559714', 'license': 'MIT', 'n_tokens_mistral': 254, 'n_tokens_neox': 251, 'n_words': 45, 'path': 'Supervised Learning/Logistic Regression Multiclass/Logistic Regression Multiclass.ipynb', 'repo_name': 'DeepLearning-DL/Machine-Learning', 'size': '674'}