I am trying to apply LogisticRegression model from sklearn to the MNIST dataset and i have split the training - test data into a 70-30 split.
However, when i simply say
model.fit(train_x, train_y)
it takes a very long time.
I have added no parameters when initiating logisticregression.
code :
import seaborn as sns
import matplotlib
import matplotlib.pyplot as plt
from sklearn.datasets import fetch_mldata
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
import tempfile
test_data_home = tempfile.mkdtemp()
mnist = fetch_mldata('MNIST original', data_home = test_data_home)
x_train, x_test, y_train, y_test = train_test_split(mnist.data, mnist.target, test_size = 0.30, random_state = 0)
lr = LogisticRegression(penalty = 'l2')
lr.fit(x_train, y_train)