gemseo.algos.doe.custom_doe.custom_doe module#
Design of experiments from custom data.
- class CustomDOE(algo_name='CustomDOE')[source]#
Bases:
BaseDOELibrary
A design of experiments from samples provided as a file or an array.
The samples are provided either as a file in text or csv format or as a sequence of sequences of numbers, e.g. a 2D numpy array.
A csv file format is assumed to have a header whereas a text file (extension .txt) does not.
- Parameters:
algo_name (str) --
The algorithm name.
By default it is set to "CustomDOE".
- Raises:
KeyError -- When the algorithm is not in the library.
- static read_file(doe_file, delimiter=',', comments='#', skiprows=0)[source]#
Read a file containing several samples (one per line) and return them.
- Parameters:
doe_file (str | Path | TextIO) -- Either the file, the filename, or the generator to read.
delimiter (str | None) --
The character used to separate values. If
None
, use whitespace.By default it is set to ",".
comments (str | Sequence[str] | None) --
The characters or list of characters used to indicate the start of a comment.
None
implies no comments.By default it is set to "#".
skiprows (int) --
Skip the first
skiprows
lines.By default it is set to 0.
- Returns:
The samples.
- Return type:
- ALGORITHM_INFOS: ClassVar[dict[str, DOEAlgorithmDescription]] = {'CustomDOE': DOEAlgorithmDescription(algorithm_name='CustomDOE', internal_algorithm_name='CustomDOE', library_name='CustomDOE', description='This samples are provided either as a file in text or csv format or as a sequence of sequences of numbers.', website='', Settings=<class 'gemseo.algos.doe.custom_doe.settings.custom_doe_settings.CustomDOE_Settings'>, handle_integer_variables=True, minimum_dimension=1)}#
The description of the algorithms contained in the library.