⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Cross-Entropy vs. Hinge Loss: How Loss Choice Shapes a Classifier

Two linear classifiers — a logistic-regression model trained with cross-entropy loss and a linear SVM trained with hinge loss — learn the same 2D dataset side by side in this 3D simulator. Watch their decision boundaries diverge in real time as full-batch gradient descent runs, while a floating loss-curve panel behind the data plane plots both loss functions against the margin and tracks each model's live average margin as a moving dot on its own curve. Adjust the learning rate, class overlap, and L2 regularization to see exactly why cross-entropy keeps refining confident predictions while hinge loss stops caring the moment a point clears the margin.