
Prediction Error & Loss Functions In Practice
Master raw error calculation, Mean Squared Error formulas, parabolic curvature geometry, and output loss derivatives through manual calculations.
Work through each problem on paper before expanding the solution details.
Part 1: The Underlying Mechanics Drill
Problem 1: Raw Error Calculation
A loan default prediction model evaluates an applicant and outputs a default probability of . Twelve months later, the borrower defaults on the loan ().
Calculate the raw prediction error . State whether the sign indicates an overestimate or an underestimate.
Reveal Solution
Sign Interpretation: The raw error is . The positive sign indicates an underestimate—the true outcome exceeded the model's low default probability estimate.
(Under the alternative control-systems convention , .)
Problem 2: Single-Sample Mean Squared Error Loss
A fraud detection network evaluates a legitimate credit card transaction () and produces a false alarm prediction of .
Calculate the standard unscaled Mean Squared Error loss .
Reveal Solution
Takeaway: The negative sign of the overestimate is eliminated by squaring, producing a positive scalar penalty of .
Problem 3: Scaled MSE Loss Computation ( Convention)
A medical diagnostic model evaluates a patient with a confirmed condition () and outputs a probability score of .
Calculate the scaled squared error loss .
Reveal Solution
Takeaway: The scaled loss is exactly half of the standard loss (), preserving the relative penalty while simplifying future derivative calculations.
Problem 4: Output Loss Derivative Evaluation
A computer vision model inspects a defective solar cell () and outputs a defect-free confidence of .
Calculate the exact derivative of standard squared loss with respect to the prediction: . State whether the slope is uphill or downhill, and what action is required to reduce loss.
Reveal Solution
Interpretation:
- The derivative is (Positive).
- A positive slope indicates the model sits on the uphill right wall of the loss bowl: increasing further will increase the loss penalty.
- To reduce loss, optimization must move in the negative gradient direction (), nudging downward toward zero.
Problem 5: Parabolic Loss Minimum Stationary Condition
For a target label , determine the exact predicted value that minimizes the loss function by setting the loss derivative to zero: .
Verify the loss value at this optimal point.
Reveal Solution
Set the derivative equal to zero:
Divide by :
Evaluate the loss at :
Geometric Conclusion: The global minimum of the parabolic loss surface occurs precisely where the prediction matches reality (). At this point, the tangent slope is zero (), and the penalty reaches its absolute lower bound ().
Part 2: Applied Scenario: The VC Pitch Flop Penalty
In Course 1, our venture capital firm uses a neural network to evaluate early-stage startup pitch decks across four locked criteria [Team Experience, Market Size, Competition, Risk].
The investment committee reviewed a hyped fintech venture (OmniCloud Analytics). The network's forward pass produced a highly confident investment greenlight score:
Based on this score, the firm invested . Eighteen months later, due to severe market saturation and high customer churn, the startup ceased operations, liquidated its assets, and declared bankruptcy:
Problem 6: Step-by-Step VC Loss & Derivative Audit
- Part A: Calculate the raw prediction error .
- Part B: Calculate the standard Mean Squared Error loss and the scaled loss .
- Part C: Calculate the output loss derivative under both the standard definition () and the scaled definition ().
- Part D (Investment Post-Mortem): In 2–3 sentences, interpret what the sign and magnitude of the derivative () signal to the upstream neural network weights for future pitch evaluations.
Reveal Solution
Part A: Raw Prediction Error
The negative sign confirms an aggressive over-prediction of above ground-truth reality.
Part B: Standard & Scaled Loss Penalties
-
Standard MSE Loss:
-
Scaled MSE Loss:
Part C: Output Loss Derivatives
-
Standard Derivative:
-
Scaled Derivative:
Part D: Investment Post-Mortem & Parameter Signal
The positive derivative () reveals that the model sits high on the right wall of the parabolic loss bowl, where increasing prediction confidence severely escalates financial penalty.
To reduce portfolio loss on similar failing ventures, the negative gradient signal () will flow backward into the network during backpropagation. This forces the upstream weight matrices to dampen the positive influence of superficial team metrics and heighten sensitivity to crowded competition, pulling future greenlight probabilities downward toward zero.