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. 1.

    Evaluate 23+6÷2×32^3 + 6 \div 2 \times 3 using correct operator precedence.

  2. 2.

    Using log rules, simplify ln(e5)\ln(e^5).

  3. 3.

    Expand the weighted sum i=13wixi\displaystyle\sum_{i=1}^{3} w_i x_i for w=[2,0,1]\mathbf{w} = [2, 0, -1] and x=[3,5,4]\mathbf{x} = [3, 5, 4].

  4. 4.

    Interpretation: A model outputs the vector [0.2,0.5,0.3][0.2, 0.5, 0.3] of class scores (indexed from 00). Using argmax\arg\max, which class does it predict, and why?

  5. 5.

    What are the range of tanh\tanh and the range of the sigmoid σ\sigma?

  6. 6.

    Shape reasoning: In NumPy, X has shape (100, 4) and w has shape (4,). What is the shape of X @ w?

  7. 7.

    In NumPy, adding an array of shape (5, 3) to one of shape (3,) gives what result?

  8. 8.

    Compute the Euclidean (L2) distance between p=[1,2]\mathbf{p} = [1, 2] and q=[4,6]\mathbf{q} = [4, 6].

  9. 9.

    The dot product of a\mathbf{a} and b\mathbf{b} is negative. What does the sign tell you about the angle θ\theta between them?

  10. 10.

    Compute the matrix–vector product AxA\mathbf{x} for A=[2013]A = \begin{bmatrix} 2 & 0 \\ 1 & 3 \end{bmatrix} and x=[42]\mathbf{x} = \begin{bmatrix} 4 \\ 2 \end{bmatrix}.

  11. 11.

    Shape reasoning: AA is (3,4)(3, 4), BB is (4,2)(4, 2), and CC is (2,5)(2, 5). What is the shape of the chained product ABCABC?

  12. 12.

    Interpretation: A square system Ax=bA\mathbf{x} = \mathbf{b} comes from two lines that are identical (one equation is a multiple of the other). How many solutions, and why?