doenut.designer
Module Contents
Functions
|
Validate an input dictionary's type. |
|
Find the ranges of data in an input dictionary |
|
Generate a full factorial model from the supplied parameters |
|
build a 2-level fractional factorial design |
|
levels is a dictionary of factor name and levels |
|
|
|
Attributes
- doenut.designer.logger
- doenut.designer._check_is_input_dict(data: Dict[Any, Iterable]) None[source]
Validate an input dictionary’s type. Most of these functions require a dictionary of lists as their input data This is a helper function that will throw an appropriate assert if needed.
- Parameters:
data (Dict[Any, Iterable]) – The data dictionary to validate
- Raises:
TypeError – If the data is of the wrong type, or if any of the values in the dictionary are not iterable
- doenut.designer.get_ranges(data: Dict[Any, Iterable[float]]) Dict[Any, List[float]][source]
Find the ranges of data in an input dictionary
Go through a dictionary of value lists, and return the same, but with only the min / max value from each in each.
- Parameters:
data (Dict[Any, Iterable[float]]) – The input dictionary to parse
- Returns:
A dictionary of the same keys, but each value has now been replaced with a list of min and max of that value list
- Return type:
Dict[Any, List[float]]
- doenut.designer.full_fact(data: Dict[Any, List[float]]) pandas.DataFrame[source]
Generate a full factorial model from the supplied parameters
- Parameters:
data (Dict[Any, List[float]]) – dict of lists of allowed values for each parameter
- Returns:
A dataframe of all the generated experiments
- Return type:
pd.DataFrame
- doenut.designer.frac_fact(data: Dict[Any, List[float]], resolution: int = None) pandas.DataFrame[source]
build a 2-level fractional factorial design
- Parameters:
data (Dict[Any, List[float]]) – dictionary to design from
resolution (float, optional) – what resolution model to build. Default is param_count/2
- Returns:
A dataframe of all the experiments
- Return type:
pd.DataFrame
- doenut.designer.experiment_designer(levels, res, do_midpoints=True, shuffle=True, repeats=1, num_midpoints=3)[source]
levels is a dictionary of factor name and levels res is the resolution (for frac fact) - shouldn’t be in class do_midpoints whether to add in the mid points shuffle whether to shuffle repeats how many repeats you’re doing of the NON-MIDPOINTS num_midpoints, how many midpoints to do
- Parameters:
levels –
res –
do_midpoints – (Default value = True)
shuffle – (Default value = True)
repeats – (Default value = 1)
num_midpoints – (Default value = 3)