Compares weaknesses in multiple models
Project description
AutoRA Model Disagreement Sampler
The model disagreement sampler identifies experimental conditions $\vec{x}' \in X'$ with respect to a pairwise distance metric between theorist models, $P_{M_{i}}(\hat{y}, \vec{x}')$:
$$ \underset{\vec{x}'}{\arg\max}~(P_{M_{1}}(\hat{y}, \vec{x}') - P_{M_{2}}(\hat{y}, \vec{x}'))^2 $$
Example Code
from autora.experimentalist.sampler.model_disagreement import model_disagreement_sample
from autora.theorist.bms import BMSRegressor; BMSRegressor()
from autora.theorist.darts import DARTSRegressor; DARTSRegressor()
import numpy as np
#Meta-Setup
X = np.linspace(start=-3, stop=6, num=10).reshape(-1, 1)
y = (X**2).reshape(-1, 1)
n = 5
#Theorists
bms_theorist = BMSRegressor()
darts_theorist = DARTSRegressor()
bms_theorist.fit(X,y)
darts_theorist.fit(X,y)
#Sampler
X_new = model_disagreement_sample(X, [bms_theorist, darts_theorist], n)
Project details
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
Close
Hashes for autora-experimentalist-sampler-model-disagreement-1.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86493c70633aad10772be59cd4a299f12a510a26972fbf68449a5434436f1b5f |
|
MD5 | f6b0c274ba664336bf4c359cedb7fe61 |
|
BLAKE2b-256 | 1f50d2feedaa7e97a0c1b6ad33bcf7ae0c910d2d6f15ced841f6459004ef0d33 |
Close
Hashes for autora_experimentalist_sampler_model_disagreement-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 976e9cdafb95d9b92ee2c19862f5fa730597efce115f3d5aa7da5dd696d1db1d |
|
MD5 | 6016fa9badf533803faf2d337f2d8e56 |
|
BLAKE2b-256 | afe8249143a7f987ab9cbcbc5b2ffcb14ea9290b1c6df6e84d0f986d899121da |