Build MLP Classifier to determine digits in MNIST dataset

Job ID: 35106372

Budget: $10 – $30 USD

Build MLP Classifier to determine digits in MNIST dataset using max_iter=1000 and solver=lbfgs.. use MinMaxScaler to scale the data for optimum results. Implement different MLP architectures
for the following scenarios and report the precision, recall, and fscore for 5-fold cross validation:
1. Layers:
(a) Use 2 hidden layers with 20 nodes in each layer.
(b) Use 2 hidden layers with 100 nodes in each layer.
(c) Use 5 hidden layers with 20 nodes in each layer.
(d) Use 5 hidden layers with 100 nodes in each layer.
2. Activation Function:
(a) Use ‘relu’.
(b) Use ‘tanh’.

Capture below metrics
1. The time it takes to fit each model as size of layers increase for various layer sizes (recommend
number of layers = 2 and size of layers = [20, 40, 60, 80, 100]). Provide graphs.
2. The time it takes to fit each model as number of layers increase for various numbers of layers
(recommend number of layers = [1, 2, 3, 4, 5] and size of layers = 20). Provide graphs.
3. What type of growth do you see for each? Why?
4. What happens in simple/smallish network if you stop using MinMaxScaler. Why?

Use below code to measure time
import time
1
start = time.time()
# do something
time_spent = time.time() - start
Related categories: Python Machine Learning (ML) NumPy Pandas