Question:

What is a loss function? Write the two categories of loss functions.

Show Hint

Tip: Regression → predict numbers, Classification → predict classes.
Updated On: Jun 30, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

A loss function is a mathematical function used to measure how well a machine learning model’s predictions match the actual target values.
It calculates the difference between the predicted output and the true output.
The goal during model training is to minimize this loss, which means improving the model’s accuracy.
Loss functions help guide the learning process by adjusting weights and parameters.
There are two main categories of loss functions:
1. Regression Loss Functions — Used when the output is continuous.
Examples include Mean Squared Error (MSE) and Mean Absolute Error (MAE).
2. Classification Loss Functions — Used when the output is categorical or discrete.
Examples include Cross-Entropy Loss and Hinge Loss.
Choosing the right loss function is essential to ensure the model learns correctly for the type of problem being solved.
Was this answer helpful?
0
0

Questions Asked in CBSE CLASS XII exam

View More Questions