AutoRA Uncertainty Experimentalist
The uncertainty experimentalist identifies experimental conditions $\vec{x}' \in X'$ with respect model uncertainty. Within the uncertainty experimentalist, 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.uncertainty import uncertainty_sample
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)
#Experimentalist
X_new = uncertainty_sample(X, lr_theorist, n, measure ="least_confident")
Metadata
Release files for autora-experimentalist-uncertainty 2.1.0
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_uncertainty-2.1.0.tar.gz | 48.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| autora_experimentalist_uncertainty-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.8 kB
Release files / autora_experimentalist_uncertainty-2.1.0.tar.gz
| Download URL | autora_experimentalist_uncertainty-2.1.0.tar.gz |
|---|---|
| Size | 48.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc2126951695b536ded22333cc11854f00adf29d436693de5e3afba511283156
|
|
BLAKE2b-256 checksum How to use checksums |
47b05af998f4108a763436c67fe37de86d3556bc912645c165b3e94a7a39a561
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Release files / autora_experimentalist_uncertainty-2.1.0-py3-none-any.whl
| Download URL | autora_experimentalist_uncertainty-2.1.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2bab43433f31c0caa1f5a7f3ff81cc56b6d4310bdb337c30fc8013adfe800757
|
|
BLAKE2b-256 checksum How to use checksums |
9a11a4737498111461853bc4f5a7e22e506eb02b3b056e9048cfe50ce8d07881
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|