Loss Functions in Machine Learning
Loss Functions in Machine Learning
Machine
Learning
A loss function is a key component of machine learning
models,
acting as a mathematical measure of the difference
between the
model's predictions and the actual target values. This
presentation
investigate into the purpose, types, and application of loss
functions in both machine learning and deep learning.
Network pruning is a technique used to reduce the size of a neural network by removing
redundant or less important parameters (weights, neurons, or layers). This helps in
reducing computational cost and improving inference speed while maintaining accuracy.
1. Weight Pruning (Unstructured Pruning)
Removes individual weights based on their magnitude.
Common approach: Magnitude-Based Pruning (eliminate weights below a threshold).
Requires sparse matrix operations for efficient implementation.
2. Neuron Pruning (Structured Pruning)
•Removes entire neurons, filters, or layers.
•More hardware-friendly as it leads to structured reductions in computation.
3. Filter Pruning (Channel Pruning)
•Eliminates entire filters in CNNs.
4. Bayesian Pruning
•Uses Bayesian inference to determine the importance of network parameters and prune
accordingly.
Naïve Bayes Classifier
Understanding the
Code
Input Loss Output
The code takes two inputs: Functions
The functions The program prints the
y_true mean_squared_error, calculated
(the actual values) and y_pred(the mean_absolute_error, and
values for MSE, MAE, and BCE,
model's predictions).
binary_cross_entropy providing a quantitative
calculate the assessment of the model's
corresponding losses
performance.
based on the
input data.