Skip to content

Commit 7ff7948

Browse files
updated 2 files
1 parent fc15fb8 commit 7ff7948

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

machine_learning/loss_functions/binary_cross_entropy.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
"""
22
Binary Cross-Entropy (BCE) Loss Function
33
4-
This script defines the Binary Cross-Entropy (BCE) loss function, commonly used for binary classification.
5-
64
Description:
7-
BCE quantifies dissimilarity between true binary labels (0 or 1) and predicted probabilities.
5+
Quantifies dissimilarity between true labels (0 or 1) and predicted probabilities.
86
It's widely used in binary classification tasks.
97
108
Formula:
119
BCE = -Σ(y_true * log(y_pred) + (1 - y_true) * log(1 - y_pred))
1210
13-
Source: [Wikipedia - Cross entropy](https://en.wikipedia.org/wiki/Cross_entropy)
11+
Source:
12+
[Wikipedia - Cross entropy](https://en.wikipedia.org/wiki/Cross_entropy)
1413
"""
1514

1615
import numpy as np

machine_learning/loss_functions/mean_squared_error.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
"""
22
Mean Squared Error (MSE) Loss Function
33
4-
This script defines the Mean Squared Error (MSE) loss function, commonly used for regression problems.
5-
64
Description:
7-
MSE measures the average squared difference between true values (ground truth) and predicted values.
5+
MSE measures the mean squared difference between true values and predicted values.
86
It serves as a measure of the model's accuracy in regression tasks.
97
108
Formula:
119
MSE = (1/n) * Σ(y_true - y_pred)^2
1210
13-
Source: [Wikipedia - Mean squared error](https://en.wikipedia.org/wiki/Mean_squared_error)
11+
Source:
12+
[Wikipedia - Mean squared error](https://en.wikipedia.org/wiki/Mean_squared_error)
1413
"""
1514

1615
import numpy as np

0 commit comments

Comments
 (0)