Week 2 Checkpoint

A short checkpoint on Week 2: functions, domain and range, composition, the standard ML activation functions (sigmoid, tanh, ReLU, softplus), and NumPy arrays, shapes, and broadcasting. Aim for 80% or better before moving to Week 3. Each explanation names the chapter to revisit if you miss it.

  1. 1.

    For f(x)=1x2f(x) = \dfrac{1}{x - 2}, what is the domain?

  2. 2.

    Given f(x)=x+1f(x) = x + 1 and g(x)=x2g(x) = x^2, what is the composition (fg)(3)=f(g(3))(f \circ g)(3) = f(g(3))?

  3. 3.

    The sigmoid σ(x)=11+ex\sigma(x) = \dfrac{1}{1 + e^{-x}} has what range, and what is σ(0)\sigma(0)?

  4. 4.

    Which statement about ReLU, ReLU(x)=max(0,x)\operatorname{ReLU}(x) = \max(0, x), is correct?

  5. 5.

    In NumPy, an array A has shape (4, 3). What is the shape of A.T (its transpose)?

  6. 6.

    In NumPy, you add an array of shape (3, 1) to an array of shape (1, 4). Broadcasting produces a result of what shape?