0% found this document useful (0 votes)
140 views3 pages

Assignment Guideline and Rubric CPC251

Uploaded by

nhmnirh
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)
140 views3 pages

Assignment Guideline and Rubric CPC251

Uploaded by

nhmnirh
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
You are on page 1/ 3

CPC251: Machine Learning and Computational Intelligence

Academic Session: Semester 2, 2023/2024


School of Computer Sciences, USM, Penang

Assignment 1

Overview
This is a group assignment.
This assignment provides you the opportunity to learn low-level TensorFlow programming. In the
assignment, you are given a dataset which can be downloaded from eLearn@USM. You need to
implement the gradient descent algorithm to estimate (train) the weights a neural network
model.
Requirements
Define the following functions.
def loss_fn():
"""
This function calculates the loss function
"""

def sigmoid():
"""
This function calculates the sigmoid function.
"""

def relu():
"""
This function calculates the ReLU function.
"""

def forward():
"""
This function calculates the forward pass (predicts the label).
"""

def train():
"""
This function performs the forward pass, computes the gradient and update the
weights and biases.
"""

def fit():
"""
This function implements the training loop.
"""
Use low-level TensorFlow programming (TensorFlow without Keras).
Create a neural network with a single hidden layer with ReLU activation. You may define your
own number of units in the layer.
Split the given dataset into three training, validation and test with a ratio of 7:1:2.
Use the training set to estimate the weights, the validation set to validate the model and the
test set to evaluate the linear regression model with the estimated weights.
Display the training loss and validation loss values for each epoch of the training loop.
Display the training loss and validation loss against epoch graph (after model training).
Evaluate the neural network model with the estimated weights on the test set and display the
confusion matrix and the classification report.
Document the codes using comments.
Note: Focus on the algorithm implementation (model is learning from the data), not the
accuracy of the model.

Additional tasks (optional):


Train the model using mini-batch gradient descent.
Implement early stopping regularization.

Submission requirements

• Due date: 13 May 2024 (Monday), 11:59 p.m. (Week 8).


• Use the given jupyter notebook template. Do not change the function name.
• The jupyter notebook must be executed to show the outputs.
• Submission must be made in ipynb format (submitted online).
• The filename must follow these naming conventions.
o <CPC251_Assignment1_GroupNo.ipynb>
• Plagiarism (using other people’s ideas and text without proper acknowledgment and
using them as your own) is a serious academic offence. The consequences for plagiarism
are severe.
Rubric
Component 10-9 (Excellent) 8-6 (Good) 5-2 (Average) 1-0 (Poor) Weightage
Requirements and The functions are The functions are Some of the functions The functions are not 3
Delivery implemented. implemented. are not implemented. implemented.

All the outputs (training All the outputs (training All the outputs (training The outputs are not
loss, validation loss, loss, validation loss, loss, validation loss, displayed
graph and model graph and model graph and model
evaluation) are evaluation) are displayed evaluation) are displayed
displayed. with minor mistakes. with major mistakes.

Runtime and Algorithm Executes without errors. Executes without errors. Executes without errors. Does not execute due to 3
error.
The algorithm is correct. The algorithm is correct The algorithm is partially
with minor mistakes. correct. The algorithm is
incorrect.

Efficiency Solution is efficient, easy The code is fairly efficient A logical solution that is A difficult to understand 3
to understand, and without sacrificing easy to follow but it is and inefficient solution.
maintain. readability and not the most efficient.
understanding. Code is huge and
appears
to be patched together.

Documentation The source codes are The source codes are The source codes are The source codes are not 1
well documented and partially documented minimally documented documented and
commented. and commented. and commented commented

You might also like