Vismo · Create · Explore · Topics · Guides · Pricing

How Covariance Shapes The Decision Boundary

This animation compares two Gaussian-distributed classes under different covariance assumptions to show how the shape of the decision boundary changes. It begins with shared spherical covariance, where the quadratic terms cancel and the boundary becomes linear. It then moves to a shared non-spherical covariance, showing a tilted linear boundary via Mahalanobis distance, and finally to unequal variances in one dimension, producing two crossing points and a quadratic boundary. Useful for undergraduate AI or machine learning students studying discriminant analysis and classifier geometry.

Narrated · 16:9 · Preview before teaching · automatic layout checks do not establish subject accuracy

The prompt that made it

# Gaussian assumptions determine the decision boundary Two colored Gaussian classes are compared through their log-posterior discriminant functions. Start with shared spherical covariance and equal priors: means (0,0) and (2,0), covariance I, and the straight boundary x1 = 1. Highlight the quadratic terms that cancel. Next use the shared covariance diag(4,1) with means (0,0) and (2,2); show the linear boundary 0.5x1 + 2x2 - 2.5 = 0 and explain the role of Mahalanobis distance. Finally switch to a clearly labeled one-dimensional example with equal priors, mean zero for both classes, and variances 1 and 4. The density curves intersect at approximately -1.360 and +1.360: the narrow Gaussian wins in the center, the wider Gaussian in the tails. Explain that unequal covariances generally retain quadratic terms. Use black backgrounds, cyan and orange contours, and synchronized formula highlighting. Useful for connecting modeling assumptions to boundary geometry. Audience: 二年级人工智能专业大学生

Make your own version

Make the next one in this series