best_sample#

obsidian.experiment.sampling.best_sample(df, k, feature_cols, *, n_trials=500, bias=None, plot_weights=False, enforce=False, random_state=None, standardize=True, dropna=True, metric='hybrid')[source]#

Repeats random sampling n_trials times and returns the most space-filling sample.

df: DataFrame of candidates k: size of the design to pick feature_cols: columns that define “space” (numeric; one-hot encode cats if needed) bias: None | dict in the format {“column”: [lower, upper, weight]} passed to

generate_weights to bias sampling towards specified ranges.