autora.experimentalist.mixture
Mixture Experimentalist Sampler
sample(conditions, temperature, samplers, params, num_samples=None)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
conditions |
Union[DataFrame, ndarray]
|
pool of experimental conditions to evaluate: pd.Dataframe |
required |
temperature |
float
|
how random is selection of conditions (cannot be 0; (0:1) - the choices are more deterministic than the choices made wrt |
required |
samplers |
list
|
tuple containing sampler functions, their names, and weights |
required |
for |
sampler functions that return both positive and negative scores, user can provide a list with two weights
|
the first one will be applied to positive scores, the second one -- to the negative |
required |
params |
dict
|
nested dictionary. keys correspond to the sampler function names (same as provided in samplers), |
required |
values |
correspond to the dictionaries of function arguments (argument name
|
its value) |
required |
num_samples |
Optional[int]
|
number of experimental conditions to select |
None
|
Returns:
Type | Description |
---|---|
DataFrame
|
Sampled pool of experimental conditions with the scores attached to them |
Source code in temp_dir/mixture/src/autora/experimentalist/mixture/__init__.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|