Skip to main content

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


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

File details

Details for the file autora-experimentalist-sampler-nearest-value-1.0.1.tar.gz.

File metadata

File hashes

Hashes for autora-experimentalist-sampler-nearest-value-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e173a58c94b603b845090e4e9a3e4a78eb3b97c4fdc4897824ef96de797548a2
MD5 a28439165d7d2eab5db4708c246e422a
BLAKE2b-256 4d88a4ed448660b2c6e53c99eff4542ee9cc75bc3cd4746661e6b9d7b462c413

See more details on using hashes here.

File details

Details for the file autora_experimentalist_sampler_nearest_value-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for autora_experimentalist_sampler_nearest_value-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 69821e675355cadd4a9daf5954d9c4c7180b944967d3acaec21eec62746df462
MD5 037e2e9ac696481533c5decb659d3c1b
BLAKE2b-256 018e702892586afdf48bdf1273ac18fc5fcdd8e8dbdc4d00678aa8192b5d02f8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page