0% found this document useful (0 votes)
6 views5 pages

Deep Learning Assignment 01

This document outlines an assignment for a Deep Learning course in the Data Science program, detailing tasks related to neural networks and the modified Iris dataset. Students are required to demonstrate their understanding of concepts such as deep learning vs. machine learning, overfitting, and model evaluation techniques. The assignment includes specific questions, submission guidelines, and grading criteria, emphasizing the importance of original work and proper referencing.

Uploaded by

faruqueanusha174
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

Deep Learning Assignment 01

This document outlines an assignment for a Deep Learning course in the Data Science program, detailing tasks related to neural networks and the modified Iris dataset. Students are required to demonstrate their understanding of concepts such as deep learning vs. machine learning, overfitting, and model evaluation techniques. The assignment includes specific questions, submission guidelines, and grading criteria, emphasizing the importance of original work and proper referencing.

Uploaded by

faruqueanusha174
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

BS(SE)V1.

FACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY


Department: Program:
DATA SCIENCE

Announced date: 19-04-2026 Due Date: 26-04-2026 Max Points:10

NAME: Abdul Rafay


REG ID: 64503
COURSE: Deep Learning
PROGRAM: BS (AI)
INSTRUCTOR: Moona Kanwal
DATE: 26TH April, 2026

Assignment # 1
Mapped PLO/GA Mapped Learning Level
Mapped SDG
CLO

CLO1 GA 2 C2 (Understanding 4&8


(Knowledge for Solving Computing
Problems)

CLO2 C3 4&8

Q1: (Marks: 5) [CLO1]


A. Use ChatGPT or another AI tool once for this question, but do not submit the AI answer
directly. Read it, verify it, and then answer the following in your own words:

a. Ask an AI tool: "Explain the difference between deep learning and machine learning for a
first-year university student." Write the best 3–4-line version of that explanation in your
own words.

Ans: Machine Learning is a part of Artificial Intelligence where systems learn from data
and make decisions without being explicitly programmed. Deep Learning is a more
advanced type of machine learning that uses neural networks with many layers to learn
patterns automatically. The main difference is that deep learning can handle more complex
tasks, like image and speech recognition, but it requires more data and computational
power.
BS(SE)V1.0

FACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY


b. Now identify one weakness, missing point, or oversimplification in the AI explanation and
improve it.

Ans: Weakness: The explanation is basic and does not mention how features are handled in
both approaches.

Improved Version:
In machine learning, important features usually have to be selected manually, which can
take time and effort. In contrast, deep learning automatically learns these features through
its layered structure. This makes deep learning more powerful for complex data, although it
is more resource-intensive.

c. Use one real-world application, such as spam detection, image recognition, or


recommendation systems, to explain why an MLP is useful.

Ans: A Multi-Layer Perceptron (MLP) can be used for tasks like image classification. It
takes pixel values as input and learns patterns such as edges and shapes. For example, it can
be trained to distinguish between cats and dogs based on these patterns. Even though more
advanced models are used today, MLPs are still helpful for understanding how neural
networks work.

d. Explain why activation functions are necessary. Then state what would go wrong if every
layer used only a linear activation.

Ans: Activation functions are important because they allow a neural network to learn
complex patterns. Without them, the network would behave like a simple linear model, no
matter how many layers it has.
If only linear functions were used:
• The model would act like a single linear equation
• It would not learn complex relationships
• It would perform poorly on tasks like image or language processing

e. Submit a short AI-use note at the end: what prompt you used, what part of the AI answer
was useful, and what part you had to correct or rethink.

Ans: AI-use Note

Prompt used:
“Explain the difference between deep learning and machine learning for a first-year university
student.”

Useful part:
It helped in understanding the basic idea and difference between the two concepts.
BS(SE)V1.0

FACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY


Correction made:
I added the concept of feature extraction and improved the explanation to make the difference
clearer and more complete.

B. A student trains a neural network for image classification and gets the following

result: Training accuracy = 98%


Validation accuracy = 81%
Training loss keeps decreasing
Validation loss starts increasing after some epochs
a. What problem is the model facing?

Ans: The model is facing overfitting. It performs very well on training data (98%) but drops on
validation data (81%). This means the model has learned the training data too well and is not
generalizing properly to new data.

b. Suggest any two techniques to reduce this problem.

Ans:
 Dropout:
It randomly turns off some neurons during training so the model does not depend too much on
specific ones.
 Data Augmentation:
It increases the dataset by making variations like flipping or rotating images, which helps the
model generalize better.

c. Which optimizer would you choose for faster initial training: SGD or Adam? Why?

Ans: Adam is better for faster initial training because it automatically adjusts the learning rate
and usually converges quicker than SGD.

d. Which one regularization technique would you apply first, and why?

Ans: Dropout should be applied first because it is simple and effective. It helps reduce
overfitting by making the model less dependent on specific neurons.
BS(SE)V1.0

FACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY


Q2: (Marks: 5) [CLO2]
You are provided with a modified version of the Iris dataset. The dataset is inspired by the classic
Iris flower dataset, but it has been altered so that standard copy-paste Iris tutorials and expected
results will not directly apply.

1. Dataset Columns
2. Column 3. Description
4. f_length 5. Modified feature 1
6. f_width 7. Modified feature 2
8. c_length 9. Modified feature 3
10. c_width 11. Modified feature 4
12. shape_ratio 13. Derived feature based on the modified measurements
14. flower_type 15. Target class label

a. Load the dataset and display the first five rows. Briefly state what each column represents.
b. Separate the input features and the target variable. Explain why flower_type is the target variable.
c. Encode the target labels into numeric form. Show the mapping used for the three classes.
d. Split the dataset into training and test sets. State the split ratio you used and why it is
reasonable for this dataset.
e. Standardize the input features before training. Explain why standardization is useful for
neural networks.
f. Build a simple Multi-Layer Perceptron with one hidden layer. The input layer must match the
number of features and the output layer must match the number of classes.
g. Train a baseline model and report training accuracy and test accuracy.
h. Evaluate the baseline model using precision, recall, F1-score, and a confusion matrix.
i. Plot the training loss curve.
j. Plot a one-vs-rest ROC curve for the test set.
k. Apply two overfitting-control techniques: (i) Dropout and (ii) L2 regularization.
l. Compare three models: baseline MLP, MLP with Dropout, and MLP with L2 regularization.
m. Write a short reflection on which model performed best, whether regularization helped, and
why this dataset is not identical to the standard Iris dataset.
You may use AI tools to support your work, but marks will be awarded for correct preprocessing,
correct code adaptation to this modified dataset, interpretation of results, and clear explanation of
your choices. Generic Iris code that does not match the dataset columns or class labels will receive
reduced marks.
Required submission items
• Python code file
• Short report with screenshots or pasted outputs
• Metric table for the three models
• Confusion matrix for the baseline model
• ROC plot for the test set
BS(SE)V1.0

FACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY


• Brief comparison of baseline, Dropout, and L2 regularization

Assignment Submission Policy


• The submission is on Moodle (LMS IQRA) and can be pdf or doc, docx type. All other files
are to be zipped
• The submission should include the assignment’s first page duly filled, questions, Typed answers
(font: Times New Roman, size=12, single line spacing, double line spacing between answers).
• The answer should have a well-defined start and end.
• The answers may be subjected to a plagiarism test with passing criteria of not more than
60% plagiarism. This also includes copying from class fellows. (50%-60% plagiarism will
be marked out of 75% of total marks, 61%-70% will be assessed on 50% of total marks,71-
75% plagiarism will be marked out of 25% of total marks)
• Text taken from other sources must be properly referenced. The reference should not be
generic, like [Link]. Generative AI tools, if used, must be smartly done.
• Marks will be given based on answer correctness (50%), well-defined answers (20%),
language and formatting (20%), and tardiness/Ontime submission (10%). Late submissions
will be panelized based on total marks (0.5 marks for each day past the submission
deadline). Holidays are included in the submission duration unless otherwise stated.

You might also like