Skip to main content

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)

Source distribution for autora-experimentalist-sampler-uncertainty 1.0.1
File Size Uploaded
autora-experimentalist-sampler-uncertainty-1.0.1.tar.gz 46.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autora-experimentalist-sampler-uncertainty 1.0.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page