AutoRA Novelty Experimentalist
Project description
AutoRA Novelty Sampler
The novelty sampler identifies experimental conditions $\vec{x}' \in X'$ with respect to a pairwise distance metric applied to existing experimental conditions $\vec{x} \in X$:
$$ \underset{\vec{x}'}{\arg\max}~f(d(\vec{x}, \vec{x}')) $$
where $f$ is an integration function applied to all pairwise distances.
Example
For instance, the integration function $f(x)=\min(x)$ and distance function $d(x, x')=|x-x'|$ identifies condition $\vec{x}'$ with the greatest minimal Euclidean distance to all existing conditions in $\vec{x} \in X$.
$$ \underset{\vec{x}}{\arg\max}~\min_i(\sum_{j=1}^n(x_{i,j} - x_{i,j}')^2) $$
To illustrate this sampling strategy, consider the following four experimental conditions that were already probed:
$x_{i,0}$ | $x_{i,1}$ | $x_{i,2}$ |
---|---|---|
0 | 0 | 0 |
1 | 0 | 0 |
0 | 1 | 0 |
0 | 0 | 1 |
Fruthermore, let's consider the following three candidate conditions $X'$:
$x_{i,0}'$ | $x_{i,1}'$ | $x_{i,2}'$ |
---|---|---|
1 | 1 | 1 |
2 | 2 | 2 |
3 | 3 | 3 |
If the novelty sampler is tasked to identify two novel conditions, it will select the last two candidate conditions $x'{1,j}$ and $x'{2,j}$ because they have the greatest minimal distance to all existing conditions $x_{i,j}$:
Example Code
import numpy as np
from autora.experimentalist.novelty import novelty_sampler, novelty_score_sampler
# Specify X and X'
X = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]])
X_prime = np.array([[1, 1, 1], [2, 2, 2], [3, 3, 3]])
# Here, we choose to identify two novel conditions
n = 2
X_sampled = novelty_sampler(conditions=X_prime, reference_conditions=X, num_samples=n)
# We may also obtain samples along with their z-scored novelty scores
(X_sampled, scores) = novelty_score_sampler(conditions=X_prime, reference_conditions=X, num_samples=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
Hashes for autora-experimentalist-novelty-1.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | efaf78a8460bad48e5f6c9dbddd2615556e7394c994d6c895fcfeddf275aef65 |
|
MD5 | b4b46886360452a783de47bc29d262e9 |
|
BLAKE2b-256 | 83e74521c2e87679781f57c7c6d321e310c7a0a142c16e57d05a1d05e410d865 |
Hashes for autora_experimentalist_novelty-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d404268a6aa7863953b614ada370f8f5d28680a13d82068b8c0b62cf5db1202e |
|
MD5 | 562b62057643b0022efbd2b22df17867 |
|
BLAKE2b-256 | cb948b43f269aeebcad2afc1cfee41fc107f2dc440be5afc3487b0c62e6ef173 |