Mid-Course Assessment (Weeks 1–4)
A cumulative assessment covering Weeks 1–4: algebra and notation, functions and activations, NumPy shapes and broadcasting, vectors and norms, matrices, and linear systems. It mixes direct calculation, shape reasoning, and short interpretation questions. Aim for 80% or better; each explanation points to the chapter to revisit if you miss it.
- 1.
Evaluate using correct operator precedence.
- 2.
Using log rules, simplify .
- 3.
Expand the weighted sum for and .
- 4.
Interpretation: A model outputs the vector of class scores (indexed from ). Using , which class does it predict, and why?
- 5.
What are the range of and the range of the sigmoid ?
- 6.
Shape reasoning: In NumPy,
Xhas shape(100, 4)andwhas shape(4,). What is the shape ofX @ w? - 7.
In NumPy, adding an array of shape
(5, 3)to one of shape(3,)gives what result? - 8.
Compute the Euclidean (L2) distance between and .
- 9.
The dot product of and is negative. What does the sign tell you about the angle between them?
- 10.
Compute the matrix–vector product for and .
- 11.
Shape reasoning: is , is , and is . What is the shape of the chained product ?
- 12.
Interpretation: A square system comes from two lines that are identical (one equation is a multiple of the other). How many solutions, and why?