---
title: SCMA30019 - Week 3 AS
tags: SCMA30019
GA: G-77TT93X4N1
---
# Week 3 Assignment
- **Due:** September 24 at 10:10 AM
- **Submission:** Please submit your work to your GitHub repository under the folder `week_3`.
- **Format:** You may use any format you prefer (PDF, JPG, or MD). However, if you upload a photo, please make sure it is clear and readable.
- **Policy Reminder:** Be mindful of our grading policy, especially regarding Academic Integrity and the Use of Tools. 👉 Refer to the course syllabus for details.
---
## ✍️ Written assignment
1. Reading and Explaining Lemmas
Your task is to read the following paper:
> **Ryck et al., *On the approximation of functions by tanh neural networks***
> [Link to paper](https://www.sciencedirect.com/science/article/pii/S0893608021003208)
Focus on **Lemma 3.1** and **Lemma 3.2**.
### 📌 What to Do
- Write a report that **explains the statements and ideas** behind these two lemmas.
- Your explanation should be written so that a college student who has completed **Calculus I and II** can understand.
- Avoid unnecessary technical jargon—your goal is to make the arguments **accessible and clear**.
### 📌 Report Requirements
- Explain each lemma **in your own words**.
- Provide enough background/context so the results make sense.
- Use examples, diagrams, or intuitive explanations if helpful.
- Submit your report in a **GitHub-readable format**:
- Markdown (`.md`)
- PDF (`.pdf`)
2. Unanswered Questions
There are unanswered questions from the lecture, and there are likely more questions we haven’t covered.
- Take a moment to think about these questions.
- Write down the ones you find important, confusing, or interesting.
- You do **not** need to answer them—just state them clearly.
## 👨🏻‍💻 Programming assignment
1. Use the **same code** from [Assignment 2 - programming assignment 1](https://hackmd.io/@teshenglin/2025_ML_week_2_AS) to calculate the error in approximating the derivative of the given function.
> You will need to slightly modify your code so that it can evaluate the derivative of your hypothesis function.
2. In this assignment, you will use a neural network to approximate both the **Runge function** and its **derivative**. Your task is to train a neural network that approximates:
a. The function $f(x)$ itself.
b. The derivative $f'(x)$.
You should define a **loss function** consisting of two components:
1). **Function loss:** the error between the predicted $f(x)$ and the true $f(x)$.
2). **Derivative loss:** the error between the predicted $f'(x)$ and the true $f'(x)$.
Write a short report (1–2 pages) explaining method, results, and discussion including
* Plot the true function and the neural network prediction together.
* Show the training/validation loss curves.
* Compute and report errors (MSE or max error).