Skip to main content
← Back to Glossary
Share:

Loss Function

A Loss Function measures how far a model's predictions deviate from the actual values. The model is trained to minimize the loss. The choice of loss function influences what the model learns: Mean Squared Error for numerical predictions, Cross-Entropy for classifications, Contrastive Losses for semantic embeddings. In Pimcore's AI models, task-specific loss functions are used.

The loss function is the optimization target of a machine learning model. During training, the model compares its predictions against actual values in the training data, computes the loss, and adjusts its parameters so the loss shrinks. Without a clearly defined loss function there is no training.

Different tasks require different loss functions. Mean Squared Error (MSE) is used for numerical regression problems (price prediction, quantity forecast), Cross-Entropy for classification tasks (spam or not, product category X or Y), Triplet or Contrastive Losses for semantic embedding tasks (similar products together, dissimilar separated).

In Pimcore's AI models, task-specific loss functions are used. Product classification models use Cross-Entropy, image tagging multi-label loss variants, semantic search Contrastive Losses. Users do not configure the loss function themselves; it is part of the pre-configured AI functions Pimcore ships for product data applications.

Get a demo fitting your requirements

Please choose between a self-guided demo or a private tour with one of our Pimcore experts.

Try Pimcore Yourself

Receive direct access to a  Pimcore Demo with pre-filled data across various modules.

Free Guided Product Tour

Experience first-hand how Pimcore can propel your business forward, guided by an expert.

We will use your personal data solely to process your request. For a better localized experience, we might share your data with certified solution partners in your geographical region. For more information, please read our privacy policy.