mfpml.design_of_experiment¶
mfpml.design_of_experiment.mf_samplers¶
- class MFLatinHyperCube(design_space, num_fidelity=None, nested=False)[source]¶
Bases:
MultiFidelitySampler
Multi-fidelity Latin HyperCube sampling
Initialization
- Parameters:
- class MFSobolSequence(design_space, num_fidelity=None, nested=False, num_skip=None)[source]¶
Bases:
MultiFidelitySampler
Multi-fidelity Sobol Sequence sampling
Initialization
- Parameters:
- class MultiFidelitySampler(design_space, num_fidelity=None, nested=False)[source]¶
Bases:
object
Base class for multi-fidelity sampling
- Parameters:
design_space (List) – design space
- __init__(design_space, num_fidelity=None, nested=False)[source]¶
- Parameters:
design_space (List) – design space
- _mf_samples_rules(num_samples)[source]¶
number of low fidelity samples should larger than high fidelity samples
- Parameters:
num_samples (List) – number of samples for each fidelity level
- Return type:
- lb(fidelity=0)[source]¶
lower bound of the design space
- Parameters:
fidelity (int, optional) – fidelity level, by default 0
- Returns:
lower bound of the design space at fidelity level fidelity
- Return type:
np.ndarray
- save_data(file_name='mf_data')[source]¶
This function is used to save the design_of_experiment to Json files
mfpml.design_of_experiment.sf_samplers¶
- class FixNumberSampler(design_space)[source]¶
Bases:
SingleFidelitySampler
Fix number of samples from design space
- Parameters:
SingleFidelitySampler (class) – base class for sampling
design_space (np.ndarray) – design space
- _abc_impl = <_abc._abc_data object>¶
- class LatinHyperCube(design_space)[source]¶
Bases:
SingleFidelitySampler
Latin Hyper cube sampling via scipy
- Parameters:
design_space (dict) – design space
- _abc_impl = <_abc._abc_data object>¶
- class RandomSampler(design_space)[source]¶
Bases:
SingleFidelitySampler
Random sampling
- _abc_impl = <_abc._abc_data object>¶
- class SingleFidelitySampler(design_space)[source]¶
Bases:
ABC
Class for drawing samples from design space
Initialization of sampler class
- Parameters:
design_space (np.ndarray) – design space
- __init__(design_space)[source]¶
Initialization of sampler class
- Parameters:
design_space (np.ndarray) – design space
- _abc_impl = <_abc._abc_data object>¶
- get_samples(num_samples, seed=123456, **kwargs)[source]¶
Get the samples
- Parameters:
- Returns:
samples – samples
- Return type:
any
Notes
The function should be completed at the sub-sclass
- property lb: ndarray[Any, Any]¶
return the lower bound of the design space
- Returns:
lower bound of the design space
- Return type:
np.ndarray[Any, Any]
- save_data(file_name='data')[source]¶
This function is used to save the design_of_experiment to Json files