Practice set — Part 7 (Q49–Q50)
Fifty applied mathematics problems for AI & Data Science spanning high-dimensional vectors and cosine similarity, neural layer matrix transformations, multivariable calculus and gradient descent optimization, conditional probability and Bayes' theorem, probability distributions and maximum likelihood estimation (MLE), ordinary least squares linear regression, logistic regression and cross-entropy loss, and covariance matrices and Principal Component Analysis (PCA).
Inverse Sigmoid (Logit) Transformation: Given \(p = \sigma(z) = 0.30\), the complementary probability is \(1 - p = 0.70\), so the odds of class \(y = 1\) are \(\frac{p}{1 - p} = \frac{0.30}{0.70} = \frac{3}{7} \approx 0.4286\).
Taking the natural logarithm recovers the linear logit \(z\): \[ z = \operatorname{logit}(0.30) = \ln\!\left(\frac{3}{7}\right) = \ln 3 - \ln 7 \approx -0.8473 \] (negative because \(p = 0.30 < 0.50\)).
Piecewise-Linear ReLU Evaluation: The Rectified Linear Unit \(f(z) = \max(0, z)\) suppresses negative pre-activations to zero while passing positive pre-activations unchanged with unit slope.
Evaluating each input independently: since \(z_1 = -4 < 0\), \(f(-4) = \max(0, -4) = 0\) (inactive neuron); since \(z_2 = 6 > 0\), \(f(6) = \max(0, 6) = 6\) (active linear regime).
