Skip to content

Commit

Permalink
Update 7b-OOD-detection-softmax.md
Browse files Browse the repository at this point in the history
  • Loading branch information
qualiaMachine authored Nov 26, 2024
1 parent b35f54e commit b38b709
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions episodes/7b-OOD-detection-softmax.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def plot_data_sample(train_data, ood_data):
```python
train_data, test_data, ood_data, train_labels, test_labels, ood_labels = prep_ID_OOD_datasests([0,1], [5])
fig = plot_data_sample(train_data, ood_data)
fig.savefig('../images/OOD-detection_image-data-preview.png', dpi=300, bbox_inches='tight')
#fig.savefig('../images/OOD-detection_image-data-preview.png', dpi=300, bbox_inches='tight')
plt.show()


Expand Down Expand Up @@ -424,7 +424,7 @@ def plot_metrics_vs_thresholds(thresholds, f1_scores, precisions, recalls, OOD_s
```
```python
fig, best_f1_threshold, best_precision_threshold, best_recall_threshold = plot_metrics_vs_thresholds(thresholds, f1_scores, precisions, recalls, 'Softmax')
fig.savefig('../images/OOD-detection_metrics_vs_softmax-thresholds.png', dpi=300, bbox_inches='tight')
#fig.savefig('../images/OOD-detection_metrics_vs_softmax-thresholds.png', dpi=300, bbox_inches='tight')

```
![OOD-detection_metrics_vs_softmax-thresholds](https://raw.githubusercontent.com/carpentries-incubator/fair-explainable-ml/main/images/OOD-detection_metrics_vs_softmax-thresholds.png)

Check warning on line 430 in episodes/7b-OOD-detection-softmax.md

View workflow job for this annotation

GitHub Actions / Build Full Site

[image missing alt-text]: https://raw.githubusercontent.com/carpentries-incubator/fair-explainable-ml/main/images/OOD-detection_metrics_vs_softmax-thresholds.png
Expand Down Expand Up @@ -464,4 +464,4 @@ plt.show()
- While simple and widely used, softmax-based methods have limitations, including sensitivity to threshold choices and reduced reliability in high-dimensional settings.
- Understanding softmax-based OOD detection lays the groundwork for exploring more advanced techniques like energy-based detection.

::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::

0 comments on commit b38b709

Please sign in to comment.