coco-experiment 2.7.4__tar.gz → 2.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/PKG-INFO +36 -10
  2. coco_experiment-2.8.0/README.md +59 -0
  3. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/src/cocoex/_version.py +1 -1
  4. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/src/cocoex/coco.c +1 -1
  5. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/src/cocoex/noiser.py +9 -2
  6. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/src/cocoex/utilities.py +4 -0
  7. coco_experiment-2.7.4/README.md +0 -33
  8. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/.gitignore +0 -0
  9. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/LICENSE +0 -0
  10. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/meson.build +0 -0
  11. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/pyproject.toml +0 -0
  12. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/scripts/run-doctest.py +0 -0
  13. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/src/cocoex/__init__.py +0 -0
  14. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/src/cocoex/bare_problem.pyx +0 -0
  15. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/src/cocoex/coco.h +0 -0
  16. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/src/cocoex/download_example.py +0 -0
  17. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/src/cocoex/exceptions.py +0 -0
  18. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/src/cocoex/interface.pyx +0 -0
  19. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/src/cocoex/solvers.py +0 -0
  20. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/tests/bbob2009_testcases.txt +0 -0
  21. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/tests/bbob2009_testcases2.txt +0 -0
  22. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/tests/test_bare_problem.py +0 -0
  23. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/tests/test_regression.py +0 -0
  24. {coco_experiment-2.7.4 → coco_experiment-2.8.0}/tests/test_suite.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coco-experiment
3
- Version: 2.7.4
3
+ Version: 2.8.0
4
4
  Summary: Benchmarking framework for all types of black-box optimization algorithms.
5
5
  Project-URL: Homepage, https://github.com/numbbo/coco-experiment
6
6
  Project-URL: Documentation, https://numbbo.github.io/coco-doc/apidocs/cocoex/
@@ -22,8 +22,15 @@ Requires-Dist: numpy>=1.24.0
22
22
  Description-Content-Type: text/markdown
23
23
 
24
24
  <h1 align="center">
25
- <img src="https://raw.githubusercontent.com/numbbo/coco-experiment/main/logo/coco-ex-300.webp" width="300">
26
- </h1><br>
25
+ <table border="0">
26
+ <td>
27
+ <img src="https://raw.githubusercontent.com/numbbo/coco-experiment/main/logo/coco-ex-300.webp">
28
+ </td>
29
+ <td>
30
+ COmparing Continuous Optimisers COCO Experiment
31
+ </td>
32
+ </table>
33
+ </h1>
27
34
 
28
35
  [![version](https://img.shields.io/pypi/v/coco-experiment?color=blue)](https://pypi.org/project/coco-experiment)
29
36
  [![license](https://img.shields.io/pypi/l/coco-experiment)](https://pypi.org/project/coco-experiment)
@@ -31,11 +38,20 @@ Description-Content-Type: text/markdown
31
38
  [![download](https://img.shields.io/pypi/dm/coco-experiment.svg?label=PyPI%20downloads)][pypi]
32
39
  [![paper](https://img.shields.io/badge/DOI-10.1080%2F10556788.2020.1808977-blue)][paper]
33
40
 
34
- *coco-experiment* is a Python module implementing the experimental part of [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting][paper].
41
+ The `coco-experiment` Python module implements the experimental part of [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting][paper].
42
+ It provides several benchmark function suites and the data logging.
35
43
 
36
- - **Website:** https://numbbo.github.io/coco/
37
- - **Source code:** https://github.com/numbbo/coco-experiment
38
- - **Bug reports:** https://github.com/numbbo/coco-experiment/issues
44
+ ## Documentation
45
+
46
+ The main documentation pages for the `coco-experiment` package `cocoex` can be found at
47
+
48
+ - [getting-started](https://numbbo.it/getting-started#experiment)
49
+ - [API documentation](https://numbbo.github.io/coco-doc/apidocs/cocoex)
50
+ - [issue tracker and bug reports](https://github.com/numbbo/coco-experiment/issues)
51
+ - [source code page](https://github.com/numbbo/coco-experiment) on GitHub
52
+ - [COCO home page](https://coco-platform.org)
53
+
54
+ Below are installation instruction and some usage hints.
39
55
 
40
56
  ## Installation
41
57
 
@@ -45,12 +61,22 @@ The easiest way to install coco-experiment is using `pip` (preferably in a virtu
45
61
  pip install -U coco-experiment
46
62
  ```
47
63
 
64
+ For the difficult way [look at this page][codepython] and start with `git clone https://github.com/numbbo/coco-experiment.git`.
65
+
48
66
  ## Usage
49
67
 
50
- Similar to scikit-learn, the name of the coco-experiment module is _not_ `coco-experiment` but rather `cocoex`.
51
- To get started, take a look at the [simple example experiment][expy].
68
+ Similar to `scikit-learn`, _the module name_ (`coco-experiment`) **is not the import name**, hence usage starts with
69
+
70
+ ```python
71
+ import cocoex
72
+ ```
73
+
74
+ To get started, take a look at the [getting-started] page and at this [simple example experiment][expy]. To run an experiment in practice, take a look at the [complete example experiment][expy2].
52
75
 
53
76
  [build]: https://github.com/numbbo/coco-experiment/actions?query=branch%3Amain
54
77
  [pypi]: https://pypi.org/project/coco-experiment/
55
78
  [paper]: https://doi.org/10.1080/10556788.2020.1808977
56
- [expy]: https://github.com/numbbo/coco-experiment/blob/main/build/python/example/example_experiment_complete.py
79
+ [getting-started]: https://coco-platform.org/getting-started/#experiment
80
+ [expy]: https://github.com/numbbo/coco-experiment/blob/main/build/python/example/example_experiment_simple.py
81
+ [expy2]: https://github.com/numbbo/coco-experiment/blob/main/build/python/example/example_experiment_complete.py
82
+ [codepython]: https://github.com/numbbo/coco-experiment/tree/main/build
@@ -0,0 +1,59 @@
1
+ <h1 align="center">
2
+ <table border="0">
3
+ <td>
4
+ <img src="https://raw.githubusercontent.com/numbbo/coco-experiment/main/logo/coco-ex-300.webp">
5
+ </td>
6
+ <td>
7
+ COmparing Continuous Optimisers COCO Experiment
8
+ </td>
9
+ </table>
10
+ </h1>
11
+
12
+ [![version](https://img.shields.io/pypi/v/coco-experiment?color=blue)](https://pypi.org/project/coco-experiment)
13
+ [![license](https://img.shields.io/pypi/l/coco-experiment)](https://pypi.org/project/coco-experiment)
14
+ [![build](https://img.shields.io/github/actions/workflow/status/numbbo/coco-experiment/build.yml?branch=main)][build]
15
+ [![download](https://img.shields.io/pypi/dm/coco-experiment.svg?label=PyPI%20downloads)][pypi]
16
+ [![paper](https://img.shields.io/badge/DOI-10.1080%2F10556788.2020.1808977-blue)][paper]
17
+
18
+ The `coco-experiment` Python module implements the experimental part of [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting][paper].
19
+ It provides several benchmark function suites and the data logging.
20
+
21
+ ## Documentation
22
+
23
+ The main documentation pages for the `coco-experiment` package `cocoex` can be found at
24
+
25
+ - [getting-started](https://numbbo.it/getting-started#experiment)
26
+ - [API documentation](https://numbbo.github.io/coco-doc/apidocs/cocoex)
27
+ - [issue tracker and bug reports](https://github.com/numbbo/coco-experiment/issues)
28
+ - [source code page](https://github.com/numbbo/coco-experiment) on GitHub
29
+ - [COCO home page](https://coco-platform.org)
30
+
31
+ Below are installation instruction and some usage hints.
32
+
33
+ ## Installation
34
+
35
+ The easiest way to install coco-experiment is using `pip` (preferably in a virtual environment):
36
+
37
+ ```python
38
+ pip install -U coco-experiment
39
+ ```
40
+
41
+ For the difficult way [look at this page][codepython] and start with `git clone https://github.com/numbbo/coco-experiment.git`.
42
+
43
+ ## Usage
44
+
45
+ Similar to `scikit-learn`, _the module name_ (`coco-experiment`) **is not the import name**, hence usage starts with
46
+
47
+ ```python
48
+ import cocoex
49
+ ```
50
+
51
+ To get started, take a look at the [getting-started] page and at this [simple example experiment][expy]. To run an experiment in practice, take a look at the [complete example experiment][expy2].
52
+
53
+ [build]: https://github.com/numbbo/coco-experiment/actions?query=branch%3Amain
54
+ [pypi]: https://pypi.org/project/coco-experiment/
55
+ [paper]: https://doi.org/10.1080/10556788.2020.1808977
56
+ [getting-started]: https://coco-platform.org/getting-started/#experiment
57
+ [expy]: https://github.com/numbbo/coco-experiment/blob/main/build/python/example/example_experiment_simple.py
58
+ [expy2]: https://github.com/numbbo/coco-experiment/blob/main/build/python/example/example_experiment_complete.py
59
+ [codepython]: https://github.com/numbbo/coco-experiment/tree/main/build
@@ -1,7 +1,7 @@
1
1
  # file generated by fabricate
2
2
  # Do not change, do not track in version control!
3
3
 
4
- __version__ = "2.7.4"
4
+ __version__ = "2.8.0"
5
5
  version = __version__
6
6
 
7
7
  if __name__ == "__main__":
@@ -31526,7 +31526,7 @@ void coco_archive_free(coco_archive_t *archive) {
31526
31526
  * don't change, don't track in version control!
31527
31527
  */
31528
31528
 
31529
- const char *coco_version = "2.7.4";
31529
+ const char *coco_version = "2.8.0";
31530
31530
  #line 1 "coco_runtime_c.c"
31531
31531
  /**
31532
31532
  * @file coco_runtime_c.c
@@ -74,12 +74,14 @@ class Noisifier:
74
74
  https://github.com/numbbo/coco-experiment/blob/main/build/python/example/example_experiment_complete.py
75
75
 
76
76
  """
77
- def __init__(self, p_add=0.2, p_subtract=0.0, p_epsilon=0, epsilon=1e-4,
77
+ p_add_single_default = 0.2
78
+ def __init__(self, p_add=None, p_subtract=0.0, p_epsilon=0.0, epsilon=1e-4,
78
79
  rands=(rand, randn, randc)):
79
80
  """constructor with 4 optional parameters for the noise model,
80
81
 
81
82
  `p_add`: probability for adding a positive heavy tail random value
82
- making the solution look worse than it is.
83
+ making the solution look worse than it actually is. The default is
84
+ 0.2 iff ``p_subtract == p_epsilon == 0`` and 0.0 otherwise.
83
85
 
84
86
  `p_subtract`: probability for subtracting a positive heavy tail
85
87
  random value making the solution look better than it is.
@@ -88,6 +90,11 @@ class Noisifier:
88
90
 
89
91
  `epsilon`: standard deviation of the Gaussian random value
90
92
  """
93
+ if p_add is None:
94
+ if p_subtract == p_epsilon == 0:
95
+ p_add = Noisifier.p_add_single_default # == 0.2
96
+ else:
97
+ p_add = 0.0
91
98
  self._params = {k: v for k, v in locals().items() if k != 'self'}
92
99
  if sum(self._params[p] for p in ('p_subtract', 'p_add')) > 1:
93
100
  warnings.warn("p_subtract={0} + p_add={1} > 1, hence p_add is interpreted"
@@ -722,6 +722,10 @@ class ExperimentRepeater:
722
722
  return [ii for ii in d if not d[ii]] # list of instance numbers with no data
723
723
  return []
724
724
  @property
725
+ def sweep(self):
726
+ """current sweep/repetition number (starts with 1)"""
727
+ return self._sweeps
728
+ @property
725
729
  def n_problems(self):
726
730
  """current number of tracked problems (different ``(id_function, dimension)``)"""
727
731
  return sum(len(self.trials(k)) > 0 for k in self._data)
@@ -1,33 +0,0 @@
1
- <h1 align="center">
2
- <img src="https://raw.githubusercontent.com/numbbo/coco-experiment/main/logo/coco-ex-300.webp" width="300">
3
- </h1><br>
4
-
5
- [![version](https://img.shields.io/pypi/v/coco-experiment?color=blue)](https://pypi.org/project/coco-experiment)
6
- [![license](https://img.shields.io/pypi/l/coco-experiment)](https://pypi.org/project/coco-experiment)
7
- [![build](https://img.shields.io/github/actions/workflow/status/numbbo/coco-experiment/build.yml?branch=main)][build]
8
- [![download](https://img.shields.io/pypi/dm/coco-experiment.svg?label=PyPI%20downloads)][pypi]
9
- [![paper](https://img.shields.io/badge/DOI-10.1080%2F10556788.2020.1808977-blue)][paper]
10
-
11
- *coco-experiment* is a Python module implementing the experimental part of [COCO: A Platform for Comparing Continuous Optimizers in a Black-Box Setting][paper].
12
-
13
- - **Website:** https://numbbo.github.io/coco/
14
- - **Source code:** https://github.com/numbbo/coco-experiment
15
- - **Bug reports:** https://github.com/numbbo/coco-experiment/issues
16
-
17
- ## Installation
18
-
19
- The easiest way to install coco-experiment is using `pip` (preferably in a virtual environment):
20
-
21
- ```python
22
- pip install -U coco-experiment
23
- ```
24
-
25
- ## Usage
26
-
27
- Similar to scikit-learn, the name of the coco-experiment module is _not_ `coco-experiment` but rather `cocoex`.
28
- To get started, take a look at the [simple example experiment][expy].
29
-
30
- [build]: https://github.com/numbbo/coco-experiment/actions?query=branch%3Amain
31
- [pypi]: https://pypi.org/project/coco-experiment/
32
- [paper]: https://doi.org/10.1080/10556788.2020.1808977
33
- [expy]: https://github.com/numbbo/coco-experiment/blob/main/build/python/example/example_experiment_complete.py
File without changes