src.environment.problem.MMO.CEC2013MMO.cec2013mmo_dataset¶
Problem Difficulty Classification¶
Difficulty Mode |
Training Set |
Testing Set |
|---|---|---|
easy |
8, 9, 13-20 |
1-7, 10-12 |
difficult |
1-7, 10-12 |
8, 9, 13-20 |
Note: When difficulty is ‘all’, both training and testing sets contain all problems (1-20).
Module Contents¶
Classes¶
Introduction¶CEC2013 MMO benchmark puts together 20 multimodal problems (including several identical functions with different dimension sizes), with different characteristics, for evaluating niching algorithms. |
API¶
- class src.environment.problem.MMO.CEC2013MMO.cec2013mmo_dataset.CEC2013MMO_Dataset(data, batch_size=1)[source]¶
Bases:
torch.utils.data.DatasetIntroduction¶
CEC2013 MMO benchmark puts together 20 multimodal problems (including several identical functions with different dimension sizes), with different characteristics, for evaluating niching algorithms.
Original Paper¶
Official Implementation¶
License¶
Simplified BSD License
Problem Suite Composition¶
The CEC2013 MMO problem suite contains 20 optimization problems, each with specific characteristics such as dimensionality, bounds, and multimodal properties. These problems are categorized into different difficulty levels (
easy,difficult, andall) and can be used for benchmarking optimization algorithms.Initialization
Introduction¶
Initialize a cec2013 mmo dataset.
Args:¶
data(list): A list of problem instances to be included in the dataset.batch_size(int, optional): The size of each batch for data retrieval. Defaults to 1.
Attributes:¶
data(list): The list of problem instances in the dataset.maxdim(int): The maximum dimensionality among all problem instances in the dataset.batch_size(int): The size of each batch for data retrieval.N(int): The total number of problem instances in the dataset.ptr(list): A list of indices representing the start of each batch.index(numpy.ndarray): An array of indices used for shuffling and accessing data.
- static get_datasets(version='numpy', train_batch_size=1, test_batch_size=1, difficulty=None, user_train_list=None, user_test_list=None, instance_seed=3849)[source]¶
Introduction:¶
A static method to generate training and testing datasets based on the specified difficulty or user-defined problem lists.
Args:¶
version(str, optional): Specifies the implementation version to use for function instances. Accepts ‘numpy’ or any other string for alternative (e.g., ‘torch’). Defaults to ‘numpy’.train_batch_size(int, optional): Batch size for the training dataset. Defaults to 1.test_batch_size(int, optional): Batch size for the testing dataset. Defaults to 1.difficulty(str, optional): Difficulty level for dataset split. Accepts ‘easy’, ‘difficult’, ‘all’, or None. If None,user_train_listanduser_test_listmust be provided.user_train_list(list of int, optional): List of function IDs to include in the training set. Used ifdifficultyis None.user_test_list(list of int, optional): List of function IDs to include in the testing set. Used ifdifficultyis None.
Returns:¶
tuple: A tuple containing two
CEC2013MMO_Datasetobjects:The first is the training dataset.
The second is the testing dataset.
Raises:¶
ValueError: Raised inget_datasetsif neitherdifficultynoruser_train_listanduser_test_listare provided, or if an invaliddifficultyvalue is specified.
- __getitem__(item)[source]¶
Introduction:¶
Retrieves a batch of problem instances based on the given batch index.
Args:¶
item(int, optional): Specifies which batch of problems of the CEC2013MMO benchmark is selected.
Returns:¶
list: A list containing a batch of problems of the CEC2013MMO benchmark.
- __len__()[source]¶
Introduction:¶
Returns the total number of problem instances in the dataset.
Returns:¶
int: The size of the CEC2013 benchmark suite.
- __add__(other: src.environment.problem.MMO.CEC2013MMO.cec2013mmo_dataset.CEC2013MMO_Dataset)[source]¶
Introduction:¶
Combines two datasets into a single dataset.
Returns:¶
Object: The combined new dataset of the CEC2013MMO benchmark suite.