Question: Load mnist digits data set. Estimate base line prediction accuracy with SDGClassifier (20 iteractions), RandomForest(max_depth=3) and RandomForest(max_depth=15). Train model on training data and predict accuracy

Load mnist digits data set. Estimate base line prediction accuracy with SDGClassifier (20 iteractions), RandomForest(max_depth=3) and RandomForest(max_depth=15). Train model on training data and predict accuracy using testing data. Record the amount of time needed to estimate each.

the given code:

import numpy as np

import os

# to make this notebook's output stable across runs

np.random.seed(42)

from six.moves import urllib

from sklearn.datasets import fetch_mldata

mnist = fetch_mldata('MNIST original')

from sklearn.model_selection import train_test_split

X = mnist["data"]

y = mnist["target"]

X_train, X_test, y_train, y_test = train_test_split(X, y)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!