File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
2
Binary Cross-Entropy (BCE) Loss Function
3
3
4
- This script defines the Binary Cross-Entropy (BCE) loss function, which is commonly used for binary classification problems .
4
+ This script defines the Binary Cross-Entropy (BCE) loss function, commonly used for binary classification.
5
5
6
6
Description:
7
- Binary Cross-Entropy (BCE), also known as log loss or logistic loss, is a popular loss function for binary classification tasks.
8
- It quantifies the dissimilarity between the true binary labels (0 or 1) and the predicted probabilities produced by a model.
9
- Lower BCE values indicate better alignment between predicted probabilities and true labels.
7
+ BCE quantifies dissimilarity between true binary labels (0 or 1) and predicted probabilities.
8
+ It's widely used in binary classification tasks.
10
9
11
10
Formula:
12
11
BCE = -Σ(y_true * log(y_pred) + (1 - y_true) * log(1 - y_pred))
13
12
14
- Source:
15
- - [Wikipedia - Cross entropy](https://en.wikipedia.org/wiki/Cross_entropy)
13
+ Source: [Wikipedia - Cross entropy](https://en.wikipedia.org/wiki/Cross_entropy)
16
14
"""
17
15
18
16
import numpy as np
You can’t perform that action at this time.
0 commit comments