AutoRA Uncertainty Sampler
The uncertainty sampler identifies experimental conditions $\vec{x}' \in X'$ with respect model uncertainty. Within the uncertainty sampler, there are three methods to determine uncertainty:
Least Confident
$$ x^* = \text{argmax} \left( 1-P(\hat{y}|x) \right), $$
where $\hat{y} = \text{argmax} P(y_i|x)$
Margin
$$ x^* = \text{argmax} \left( P(\hat{y}_1|x) - P(\hat{y}_2|x) \right), $$
where $\hat{y}_1$ and $\hat{y}_2$ are the first and second most probable class labels under the model, respectively.
Entropy
$$ x^* = \text{argmax} \left( - \sum P(y_i|x)\text{log} P(y_i|x) \right) $$
Example Code
from autora.experimentalist.sampler.uncertainty import uncertainty_sampler
from sklearn.linear_model import LogisticRegression
import numpy as np
#Meta-Setup
X = np.linspace(start=-3, stop=6, num=10).reshape(-1, 1)
y = (X**2).reshape(-1)
n = 5
#Theorists
lr_theorist = LogisticRegression()
lr_theorist.fit(X,y)
#Sampler
X_new = uncertainty_sampler(X, lr_theorist, n, measure ="least_confident")
Metadata
Release files for autora-experimentalist-sampler-uncertainty 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| autora-experimentalist-sampler-uncertainty-1.0.1.tar.gz | 46.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| autora_experimentalist_sampler_uncertainty-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.3 kB
Release files / autora-experimentalist-sampler-uncertainty-1.0.1.tar.gz
| Download URL | autora-experimentalist-sampler-uncertainty-1.0.1.tar.gz |
|---|---|
| Size | 46.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee4499aa6233713eb4b93b013ff4e747ca730307701e55f09434053cca2fde0a
|
|
BLAKE2b-256 checksum How to use checksums |
c86fbcff9a07338769f3b0519846b61a3045880e19b9ad30d841c3f33178ccc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / autora_experimentalist_sampler_uncertainty-1.0.1-py3-none-any.whl
| Download URL | autora_experimentalist_sampler_uncertainty-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
589ff600ab2b6f1fcb0eea127bbc10c33d3b829aa746b03dd8329fd5e49dd165
|
|
BLAKE2b-256 checksum How to use checksums |
b9be913664adc4979da575b1b3de630d08982edee2eb64342320d6e73f6298a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|