Everything tagged #machine-learning
9 articles, newest first.
Articles tagged #machine-learning
Why Loss Functions Use the Log, and KL Divergence
Multiplying probabilities across a dataset collapses to zero in float32, while raw exponentials blow up to infinity. Derive why logarithms turn probability products into sums, how the log-sum-exp trick prevents overflow, and how KL divergence compares full probability distributions.

Loss Functions: Measuring Model Error
A neural network cannot learn from a prediction that is merely called wrong. Build MSE, MAE, binary cross entropy, and multiclass cross entropy from first principles, then see why PyTorch classification losses take logits directly.

GELU, SiLU, and Softmax: Choosing by Layer
ReLU unlocked deep networks with a sharp corner at zero, yet leaves no middle ground for mildly negative evidence or competing output scores. Derive ELU, GELU, SiLU, Softplus, and Softmax from first principles, and choose the right activation for every layer role.

Activation Functions: Why ReLU Replaced Sigmoid
Sigmoid and tanh look smooth and well-behaved until their tails flatten out and choke deep training signals. Derive every curve, slope, and derivative behind sigmoid, tanh, ReLU, and Leaky ReLU to see why modern networks switched.

Counting Neural Network Parameters and FLOPs
One hidden layer can approximate a wide range of continuous functions, yet every extra neuron demands memory and arithmetic. Derive parameter counts, forward FLOPs, batch scaling, and widening behavior directly from weight matrix shapes.

From One Neuron to Deep Neural Networks
A single neuron multiplies inputs by weights, adds a bias, and draws one straight boundary. That works until a pattern like XOR refuses to separate cleanly. Stacking layers with nonlinear activations bends the space so a network can build representations step by step.

Explainable AI: Opening the Black Box with SHAP and LIME
High test accuracy is meaningless if a model exploits spurious correlations. How cooperative game theory and local linear surrogates bring mathematical interpretability to deep learning.

Logistic Regression Explained
Despite the name, it is a classification algorithm. It models the probability of a binary outcome from one or more predictor variables.

Linear Regression Explained
A supervised algorithm that models the relationship between your features and a target, on the assumption that the relationship is a straight line.
