CSL7620_A2
CSL7620_A2
Q2: We will use the fashion-MNIST dataset for this question (you can download it from any
other source also including libraries). Flatten and preprocess the data (if required) before starting
the tasks. It will become a 784-dimensional data with 10 classes, more details are available in the
link. ( 20 Marks )
a) Train the k-means model on f-MNIST data with k = 10 and 10 random 784-dimensional
points (in input range) as initializations. Report the number of points in each cluster.
b) Visualize the cluster centers of each cluster as 2D images of all clusters.
c) Visualize 10 images corresponding to each cluster.
d) Train another k-means model with 10 images from each class as initializations , report the
number of points in each cluster, and visualize the cluster centers.
e) Visualize 10 images corresponding to each cluster.
f) Evaluate Clusters of part a and part d with Sum of Squared Error (SSE) method. Report
the scores and comment on which case is a better clustering.
Q3: Implementation of Neural Networks from Scratch Using NumPy and Comparison with
Sklearn (20 marks)
a) Load and preprocess the MNIST Digits Dataset. (3 marks)
b) Implement a neural network with one input layer, one hidden layer, and one output layer
using NumPy. (5 marks)
c) Train the neural network with various hyperparameters (e.g., learning rate, number of
hidden nodes). (3 marks)
d) Evaluate the performance of the neural network on the testing set. (2 marks)
e) Implement the same neural network using sklearn and compare the results with the
NumPy implementation. (4 marks)
f) Plot the training and validation loss/accuracy curves (for both experiments). (3 marks)
Q4: Select a project from the list provided in the document and implement a complete
end-to-end machine learning pipeline for the same. Also, prepare a demo using gradio/streamlit
for evaluation. For gradio sample app ref:
https://colab.research.google.com/github/kirenz/lab-huggingface/blob/main/code/gradio.ipynb
(50 marks)
List of projects:
https://docs.google.com/document/d/1HYz5TA1QBhhutvWdKIKvTr4v6SzebjrKxZbklh8zsZo/e
dit?usp=sharing
Note: The report should contain detailed explanations and analysis for your observations. Just
reiterating the code will not fetch you any marks.