tappiofunktio
tappiofunktio, commonly translated as loss function in English, is a function used in statistics and machine learning to quantify the cost of prediction errors. Given a model's predictions and the true targets, the loss assigns a nonnegative value that typically increases with error. The learning process seeks to minimize the loss over the training data, thereby improving predictive accuracy.
Common examples include mean squared error (MSE) for regression, cross-entropy loss for classification, hinge loss for
Loss functions often possess properties that facilitate optimization. Differentiability enables gradient-based methods; convexity can guarantee a
In practice, the loss is part of a larger objective function, sometimes called the cost or objective;
Notes: The loss value per sample vs. average loss over a dataset; scaling, class imbalance, and outliers