# ML Confidence Scores
The problem is straightforward: given a prediction of some output value, we wish to know how *confident* our model is about that prediction.
Generally, in the case of a neural net or logistic regression, a simple confident score would be to take the maximum value of the output layer and use that as your confidence. For instance, if we are trying to predict what animal is in an image, and our classifier returns a vector containing a vector of probabilities corresponding to each animals likelihood of being in the image, then we can take the max of that vector and use that as our confidence. For example:
```
y_hat = [0.1, 0.05, 0.7, 0.05, 0.1]
```
Here we would take our confidence score to be 70% that the image contained the animal associated with our third index.
There are other notes related to this in [Bayesian Analysis](Bayesian%20Analysis.md) and [Bayesian Inference](Bayesian%20Inference.md).
### Distance Based Confidence Score (via embeddings)
See more [here](https://www.youtube.com/watch?v=BCtkMHiwINs). The general idea is that $x