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_sampler import model_disagreement_sampler
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_sampler(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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fa6cba9988da657339520dd4d36a09cfe78ec87e1e175053b95b8671489ecb6 |
|
MD5 | fba6505b0818954f663ca0c986b6d0d6 |
|
BLAKE2b-256 | d06250f941d5054441d7659eb04d98e2cf2572f5eafe57f32f33ad0804c648b8 |
Close
Hashes for autora_experimentalist_sampler_model_disagreement-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a52bc2e1b29a8f3809f20644820a80865cd7bc827f1329d5c7e9397300f0bc24 |
|
MD5 | f77118b69e612bfcee92690192e6a021 |
|
BLAKE2b-256 | e1ea5d5f9cdfce3af7aaed0f50535f2aebcbe448b36b313742e43a3d3230062e |