Experimentalist based on where the model is least certain.
Project description
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")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autora_experimentalist_uncertainty-2.1.0.tar.gz.
File metadata
- Download URL: autora_experimentalist_uncertainty-2.1.0.tar.gz
- Upload date:
- Size: 48.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc2126951695b536ded22333cc11854f00adf29d436693de5e3afba511283156
|
|
| MD5 |
31f0c74c80ae867e345675d29b967412
|
|
| BLAKE2b-256 |
47b05af998f4108a763436c67fe37de86d3556bc912645c165b3e94a7a39a561
|
File details
Details for the file autora_experimentalist_uncertainty-2.1.0-py3-none-any.whl.
File metadata
- Download URL: autora_experimentalist_uncertainty-2.1.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bab43433f31c0caa1f5a7f3ff81cc56b6d4310bdb337c30fc8013adfe800757
|
|
| MD5 |
ef378bc140b8f7c100a0a831e4c599da
|
|
| BLAKE2b-256 |
9a11a4737498111461853bc4f5a7e22e506eb02b3b056e9048cfe50ce8d07881
|