A sampler which returns the nearest values between the input samples and the allowed values, without replacement.
Project description
AutoRA Nearest Value Sampler
A sampler which returns the nearest values between the input samples and the allowed values, without replacement.
Example Code
from autora.experimentalist.sampler.nearest_value import nearest_values_sampler
import numpy as np
#Meta-Setup
X_allowed = np.linspace(-3, 6, 10)
X = np.random.choice(X_allowed,10)
n = 5
#Sampler
X_new = nearest_values_sampler(X, X_allowed, n)
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
Close
Hashes for autora-experimentalist-sampler-nearest-value-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbb5be234c53e349745ecba140eebda6ecfcc5ed8ac91a52b0ed6fef028e3ce5 |
|
MD5 | 12e4fbc4f3e56174d9a6ce421292381e |
|
BLAKE2b-256 | cacd90fb88473e88dab009fbf4f964ad84277c0a1d53462133ecb4ff8b86874b |
Close
Hashes for autora_experimentalist_sampler_nearest_value-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35413952843e0ae208058f1d8fa072757d1ac22566df2d091ae19bd32c019975 |
|
MD5 | de67289567b79baf7847127bebf64d16 |
|
BLAKE2b-256 | aabf104381d98d17aa8ebe7353898c1e4ca7666b12d3d6c8f0adf1d726b2d6b8 |