samplerslib 2610.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 (140) hide show
  1. samplerslib-2610.0/.github/workflows/lx-build-and-tests.yml +51 -0
  2. samplerslib-2610.0/.github/workflows/macos-build-and-pytest.yml +51 -0
  3. samplerslib-2610.0/.github/workflows/win-build-and-pytest.yml +50 -0
  4. samplerslib-2610.0/.gitignore +161 -0
  5. samplerslib-2610.0/LICENSE +681 -0
  6. samplerslib-2610.0/PKG-INFO +28 -0
  7. samplerslib-2610.0/README.md +16 -0
  8. samplerslib-2610.0/benchmarking/benchmarking.py +159 -0
  9. samplerslib-2610.0/benchmarking/bm_uncon_functions.py +83 -0
  10. samplerslib-2610.0/benchmarking/bm_unconctrained.py +202 -0
  11. samplerslib-2610.0/benchmarking/data.json +1 -0
  12. samplerslib-2610.0/benchmarking/data0.json +1 -0
  13. samplerslib-2610.0/benchmarking/data1.json +1 -0
  14. samplerslib-2610.0/benchmarking/plots/ackley_fun.png +0 -0
  15. samplerslib-2610.0/benchmarking/plots/ackley_perf.png +0 -0
  16. samplerslib-2610.0/benchmarking/plots/avg_fun.png +0 -0
  17. samplerslib-2610.0/benchmarking/plots/griewank_fun.png +0 -0
  18. samplerslib-2610.0/benchmarking/plots/griewank_perf.png +0 -0
  19. samplerslib-2610.0/benchmarking/plots/rastrigin_fun.png +0 -0
  20. samplerslib-2610.0/benchmarking/plots/rastrigin_perf.png +0 -0
  21. samplerslib-2610.0/benchmarking/plots/rosen_fun.png +0 -0
  22. samplerslib-2610.0/benchmarking/plots/rosen_perf.png +0 -0
  23. samplerslib-2610.0/benchmarking/plots/schwefel12_fun.png +0 -0
  24. samplerslib-2610.0/benchmarking/plots/schwefel12_perf.png +0 -0
  25. samplerslib-2610.0/benchmarking/plotting.py +102 -0
  26. samplerslib-2610.0/benchmarking/results/ackley.json +1 -0
  27. samplerslib-2610.0/benchmarking/results/griewank.json +1 -0
  28. samplerslib-2610.0/benchmarking/results/rastrigin.json +1 -0
  29. samplerslib-2610.0/benchmarking/results/rosen.json +1 -0
  30. samplerslib-2610.0/benchmarking/results/schwefel12.json +1 -0
  31. samplerslib-2610.0/benchmarking/results/schwefel2000.json +1 -0
  32. samplerslib-2610.0/benchmarking/results/weierstrass.json +1 -0
  33. samplerslib-2610.0/build/lib.win-amd64-cpython-310/samplersLib/predictors.cp310-win_amd64.pyd +0 -0
  34. samplerslib-2610.0/build/lib.win-amd64-cpython-310/samplersLib/samplers.cp310-win_amd64.pyd +0 -0
  35. samplerslib-2610.0/build/lib.win-amd64-cpython-311/samplersLib/predictors.cp311-win_amd64.pyd +0 -0
  36. samplerslib-2610.0/build/lib.win-amd64-cpython-311/samplersLib/samplers.cp311-win_amd64.pyd +0 -0
  37. samplerslib-2610.0/build/lib.win-amd64-cpython-311/samplersLib/samplers_obf.cp311-win_amd64.pyd +0 -0
  38. samplerslib-2610.0/build/lib.win-amd64-cpython-312/samplersLib/predictors.cp312-win_amd64.pyd +0 -0
  39. samplerslib-2610.0/build/lib.win-amd64-cpython-312/samplersLib/samplers.cp312-win_amd64.pyd +0 -0
  40. samplerslib-2610.0/build/lib.win-amd64-cpython-313/samplersLib/predictors.cp313-win_amd64.pyd +0 -0
  41. samplerslib-2610.0/build/lib.win-amd64-cpython-313/samplersLib/samplers.cp313-win_amd64.pyd +0 -0
  42. samplerslib-2610.0/dev/build_protected.py +57 -0
  43. samplerslib-2610.0/dev/data.json +1 -0
  44. samplerslib-2610.0/dev/predictors.py +475 -0
  45. samplerslib-2610.0/dev/samplers.py +2422 -0
  46. samplerslib-2610.0/dev/samplers_obf.c +65233 -0
  47. samplerslib-2610.0/dev/samplers_obf.py +520 -0
  48. samplerslib-2610.0/dev/temp_20260415/predictors.cp310-win_amd64.pyd +0 -0
  49. samplerslib-2610.0/dev/temp_20260415/predictors.cp311-win_amd64.pyd +0 -0
  50. samplerslib-2610.0/dev/temp_20260415/predictors.cp312-win_amd64.pyd +0 -0
  51. samplerslib-2610.0/dev/temp_20260415/predictors.cp313-win_amd64.pyd +0 -0
  52. samplerslib-2610.0/dev/temp_20260415/predictors.cpython-310-darwin.so +0 -0
  53. samplerslib-2610.0/dev/temp_20260415/predictors.cpython-310-x86_64-linux-gnu.so +0 -0
  54. samplerslib-2610.0/dev/temp_20260415/predictors.cpython-311-darwin.so +0 -0
  55. samplerslib-2610.0/dev/temp_20260415/predictors.cpython-311-x86_64-linux-gnu.so +0 -0
  56. samplerslib-2610.0/dev/temp_20260415/predictors.cpython-312-darwin.so +0 -0
  57. samplerslib-2610.0/dev/temp_20260415/predictors.cpython-312-x86_64-linux-gnu.so +0 -0
  58. samplerslib-2610.0/dev/temp_20260415/predictors.cpython-313-darwin.so +0 -0
  59. samplerslib-2610.0/dev/temp_20260415/predictors.cpython-313-x86_64-linux-gnu.so +0 -0
  60. samplerslib-2610.0/dev/temp_20260415/samplers.cp310-win_amd64.pyd +0 -0
  61. samplerslib-2610.0/dev/temp_20260415/samplers.cp311-win_amd64.pyd +0 -0
  62. samplerslib-2610.0/dev/temp_20260415/samplers.cp312-win_amd64.pyd +0 -0
  63. samplerslib-2610.0/dev/temp_20260415/samplers.cp313-win_amd64.pyd +0 -0
  64. samplerslib-2610.0/dev/temp_20260415/samplers.cpython-310-darwin.so +0 -0
  65. samplerslib-2610.0/dev/temp_20260415/samplers.cpython-310-x86_64-linux-gnu.so +0 -0
  66. samplerslib-2610.0/dev/temp_20260415/samplers.cpython-311-darwin.so +0 -0
  67. samplerslib-2610.0/dev/temp_20260415/samplers.cpython-311-x86_64-linux-gnu.so +0 -0
  68. samplerslib-2610.0/dev/temp_20260415/samplers.cpython-312-darwin.so +0 -0
  69. samplerslib-2610.0/dev/temp_20260415/samplers.cpython-312-x86_64-linux-gnu.so +0 -0
  70. samplerslib-2610.0/dev/temp_20260415/samplers.cpython-313-darwin.so +0 -0
  71. samplerslib-2610.0/dev/temp_20260415/samplers.cpython-313-x86_64-linux-gnu.so +0 -0
  72. samplerslib-2610.0/dev/temp_20260416/predictors.py +475 -0
  73. samplerslib-2610.0/dev/temp_20260416/predictors_obf.c +24461 -0
  74. samplerslib-2610.0/dev/temp_20260416/samplers.py +2452 -0
  75. samplerslib-2610.0/dev/temp_20260416/samplers_obf.c +65824 -0
  76. samplerslib-2610.0/logo.png +0 -0
  77. samplerslib-2610.0/pyproject.toml +83 -0
  78. samplerslib-2610.0/src/samplersLib/__init__.py +29 -0
  79. samplerslib-2610.0/src/samplersLib/_common.py +75 -0
  80. samplerslib-2610.0/src/samplersLib/importance.py +173 -0
  81. samplerslib-2610.0/src/samplersLib/kernels.py +2626 -0
  82. samplerslib-2610.0/src/samplersLib/metrics.py +207 -0
  83. samplerslib-2610.0/src/samplersLib/particle.py +59 -0
  84. samplerslib-2610.0/src/samplersLib/predictors.cp310-win_amd64.pyd +0 -0
  85. samplerslib-2610.0/src/samplersLib/predictors.cp311-win_amd64.pyd +0 -0
  86. samplerslib-2610.0/src/samplersLib/predictors.cp312-win_amd64.pyd +0 -0
  87. samplerslib-2610.0/src/samplersLib/predictors.cp313-win_amd64.pyd +0 -0
  88. samplerslib-2610.0/src/samplersLib/predictors.cpython-310-darwin.so +0 -0
  89. samplerslib-2610.0/src/samplersLib/predictors.cpython-310-x86_64-linux-gnu.so +0 -0
  90. samplerslib-2610.0/src/samplersLib/predictors.cpython-311-darwin.so +0 -0
  91. samplerslib-2610.0/src/samplersLib/predictors.cpython-311-x86_64-linux-gnu.so +0 -0
  92. samplerslib-2610.0/src/samplersLib/predictors.cpython-312-darwin.so +0 -0
  93. samplerslib-2610.0/src/samplersLib/predictors.cpython-312-x86_64-linux-gnu.so +0 -0
  94. samplerslib-2610.0/src/samplersLib/predictors.cpython-313-darwin.so +0 -0
  95. samplerslib-2610.0/src/samplersLib/predictors.cpython-313-x86_64-linux-gnu.so +0 -0
  96. samplerslib-2610.0/src/samplersLib/reducers.py +158 -0
  97. samplerslib-2610.0/src/samplersLib/samplers.cp310-win_amd64.pyd +0 -0
  98. samplerslib-2610.0/src/samplersLib/samplers.cp311-win_amd64.pyd +0 -0
  99. samplerslib-2610.0/src/samplersLib/samplers.cp312-win_amd64.pyd +0 -0
  100. samplerslib-2610.0/src/samplersLib/samplers.cp313-win_amd64.pyd +0 -0
  101. samplerslib-2610.0/src/samplersLib/samplers.cpython-310-darwin.so +0 -0
  102. samplerslib-2610.0/src/samplersLib/samplers.cpython-310-x86_64-linux-gnu.so +0 -0
  103. samplerslib-2610.0/src/samplersLib/samplers.cpython-311-darwin.so +0 -0
  104. samplerslib-2610.0/src/samplersLib/samplers.cpython-311-x86_64-linux-gnu.so +0 -0
  105. samplerslib-2610.0/src/samplersLib/samplers.cpython-312-darwin.so +0 -0
  106. samplerslib-2610.0/src/samplersLib/samplers.cpython-312-x86_64-linux-gnu.so +0 -0
  107. samplerslib-2610.0/src/samplersLib/samplers.cpython-313-darwin.so +0 -0
  108. samplerslib-2610.0/src/samplersLib/samplers.cpython-313-x86_64-linux-gnu.so +0 -0
  109. samplerslib-2610.0/tests/predictors/test_predictors_as.py +170 -0
  110. samplerslib-2610.0/tests/test_importance/test_importance_dt.py +135 -0
  111. samplerslib-2610.0/tests/test_importance/test_importance_rf.py +107 -0
  112. samplerslib-2610.0/tests/test_kernels/test_kernels_biweight.py +65 -0
  113. samplerslib-2610.0/tests/test_kernels/test_kernels_cauchy.py +105 -0
  114. samplerslib-2610.0/tests/test_kernels/test_kernels_cosine.py +50 -0
  115. samplerslib-2610.0/tests/test_kernels/test_kernels_epanechnikov.py +71 -0
  116. samplerslib-2610.0/tests/test_kernels/test_kernels_gaussian.py +119 -0
  117. samplerslib-2610.0/tests/test_kernels/test_kernels_gaussian_rbf.py +62 -0
  118. samplerslib-2610.0/tests/test_kernels/test_kernels_inv_mq_rbf.py +52 -0
  119. samplerslib-2610.0/tests/test_kernels/test_kernels_laplace.py +76 -0
  120. samplerslib-2610.0/tests/test_kernels/test_kernels_linear.py +79 -0
  121. samplerslib-2610.0/tests/test_kernels/test_kernels_logistic.py +57 -0
  122. samplerslib-2610.0/tests/test_kernels/test_kernels_mq_rbf.py +73 -0
  123. samplerslib-2610.0/tests/test_kernels/test_kernels_sigmoid.py +38 -0
  124. samplerslib-2610.0/tests/test_kernels/test_kernels_silverman.py +74 -0
  125. samplerslib-2610.0/tests/test_kernels/test_kernels_thin_plate_sp_rbf.py +60 -0
  126. samplerslib-2610.0/tests/test_kernels/test_kernels_tricube.py +62 -0
  127. samplerslib-2610.0/tests/test_kernels/test_kernels_triweight.py +47 -0
  128. samplerslib-2610.0/tests/test_kernels/test_kernels_urect.py +74 -0
  129. samplerslib-2610.0/tests/test_metrics/test_tw.py +112 -0
  130. samplerslib-2610.0/tests/test_particle.py +140 -0
  131. samplerslib-2610.0/tests/test_samplers/test_samplers_active_sampling.py +226 -0
  132. samplerslib-2610.0/tests/test_samplers/test_samplers_bayesian_active_sampling.py +193 -0
  133. samplerslib-2610.0/tests/test_samplers/test_samplers_bitpe.py +217 -0
  134. samplerslib-2610.0/tests/test_samplers/test_samplers_ff.py +93 -0
  135. samplerslib-2610.0/tests/test_samplers/test_samplers_halton.py +126 -0
  136. samplerslib-2610.0/tests/test_samplers/test_samplers_lhs.py +115 -0
  137. samplerslib-2610.0/tests/test_samplers/test_samplers_rs.py +59 -0
  138. samplerslib-2610.0/tests/test_samplers/test_samplers_tunable_pss.py +105 -0
  139. samplerslib-2610.0/tests/test_samplers/test_samplers_tunable_sa.py +188 -0
  140. samplerslib-2610.0/uv.lock +1601 -0
@@ -0,0 +1,51 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name: lx-build-and-pytest
5
+
6
+ on:
7
+ push:
8
+ branches: [ "DEV" ]
9
+ pull_request:
10
+ branches: [ "DEV" ]
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ lx-build-and-tests:
17
+ name: Python ${{ matrix.python-version }}
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
23
+
24
+ steps:
25
+ - uses: actions/checkout@v5
26
+
27
+ - name: Install uv and set Python version
28
+ uses: astral-sh/setup-uv@v4
29
+ with:
30
+ # Automatically uses the version from the matrix
31
+ python-version: ${{ matrix.python-version }}
32
+ enable-cache: true
33
+
34
+ - name: Install dependencies
35
+ # uv sync will respect the python-version set by setup-uv
36
+ run: uv sync --frozen
37
+
38
+ - name: ruff lint
39
+ run: uvx ruff check .
40
+
41
+ - name: Build package
42
+ run: uv build
43
+
44
+ - name: Install built wheel
45
+ run: |
46
+ uv pip install --find-links dist samplersLib
47
+ uv pip install plotly matplotlib flake8 pytest pytest-cov
48
+
49
+ - name: Run tests
50
+ # Use 'uv run' to ensure the correct virtualenv is used
51
+ run: uv run pytest
@@ -0,0 +1,51 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name: macos-build-and-pytest
5
+
6
+ on:
7
+ push:
8
+ branches: [ "DEV" ]
9
+ pull_request:
10
+ branches: [ "DEV" ]
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ macos-build-and-tests:
17
+ name: Python ${{ matrix.python-version }}
18
+ runs-on: macos-latest
19
+
20
+ strategy:
21
+ fail-fast: false
22
+ matrix:
23
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
24
+
25
+ steps:
26
+ - uses: actions/checkout@v5
27
+ - name: Install uv and set Python version
28
+ uses: astral-sh/setup-uv@v4
29
+ with:
30
+ # Automatically uses the version from the matrix
31
+ python-version: ${{ matrix.python-version }}
32
+ enable-cache: true
33
+
34
+ - name: Install dependencies
35
+ # uv sync will respect the python-version set by setup-uv
36
+ run: uv sync --frozen
37
+
38
+ - name: ruff lint
39
+ run: uvx ruff check .
40
+
41
+ - name: Build package
42
+ run: uv build
43
+
44
+ - name: Install built wheel
45
+ run: |
46
+ uv pip install --find-links dist samplersLib
47
+ uv pip install plotly matplotlib flake8 pytest pytest-cov
48
+
49
+ - name: Run tests
50
+ # Use 'uv run' to ensure the correct virtualenv is used
51
+ run: uv run pytest
@@ -0,0 +1,50 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name: win-build-and-pytest
5
+
6
+ on:
7
+ push:
8
+ branches: [ "DEV" ]
9
+ pull_request:
10
+ branches: [ "DEV" ]
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ win-build-and-tests:
17
+ name: Python ${{ matrix.python-version }}
18
+ runs-on: windows-latest
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
23
+
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - name: Install uv and set Python version
27
+ uses: astral-sh/setup-uv@v4
28
+ with:
29
+ # Automatically uses the version from the matrix
30
+ python-version: ${{ matrix.python-version }}
31
+ enable-cache: true
32
+
33
+ - name: Install dependencies
34
+ # uv sync will respect the python-version set by setup-uv
35
+ run: uv sync --frozen
36
+
37
+ - name: ruff lint
38
+ run: uvx ruff check .
39
+
40
+ - name: Build package
41
+ run: uv build
42
+
43
+ - name: Install built wheel
44
+ run: |
45
+ uv pip install --find-links dist samplersLib
46
+ uv pip install plotly matplotlib flake8 pytest pytest-cov
47
+
48
+ - name: Run tests
49
+ # Use 'uv run' to ensure the correct virtualenv is used
50
+ run: uv run pytest
@@ -0,0 +1,161 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ # *.py[cod]
4
+ *$py.class
5
+ .archive.dist/
6
+ # C extensions
7
+ # *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ /build/
12
+ develop-eggs/
13
+ downloads/
14
+ eggs/
15
+ .eggs/
16
+ lib/
17
+ lib64/
18
+ parts/
19
+ sdist/
20
+ var/
21
+ wheels/
22
+ share/python-wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+ MANIFEST
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ pip-log.txt
36
+ pip-delete-this-directory.txt
37
+
38
+ # Unit test / coverage reports
39
+ htmlcov/
40
+ .tox/
41
+ .nox/
42
+ .coverage
43
+ .coverage.*
44
+ .cache
45
+ nosetests.xml
46
+ coverage.xml
47
+ *.cover
48
+ *.py,cover
49
+ .hypothesis/
50
+ .pytest_cache/
51
+ cover/
52
+
53
+ # Translations
54
+ *.mo
55
+ *.pot
56
+
57
+ # Django stuff:
58
+ *.log
59
+ local_settings.py
60
+ db.sqlite3
61
+ db.sqlite3-journal
62
+
63
+ # Flask stuff:
64
+ instance/
65
+ .webassets-cache
66
+
67
+ # Scrapy stuff:
68
+ .scrapy
69
+
70
+ # Sphinx documentation
71
+ docs/_build/
72
+
73
+ # PyBuilder
74
+ .pybuilder/
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ # For a library or package, you might want to ignore these files since the code is
86
+ # intended to run in multiple environments; otherwise, check them in:
87
+ # .python-version
88
+
89
+ # pipenv
90
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
91
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
92
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
93
+ # install all needed dependencies.
94
+ #Pipfile.lock
95
+
96
+ # poetry
97
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
98
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
99
+ # commonly ignored for libraries.
100
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
101
+ #poetry.lock
102
+
103
+ # pdm
104
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
105
+ #pdm.lock
106
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
107
+ # in version control.
108
+ # https://pdm.fming.dev/#use-with-ide
109
+ .pdm.toml
110
+
111
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
112
+ __pypackages__/
113
+
114
+ # Celery stuff
115
+ celerybeat-schedule
116
+ celerybeat.pid
117
+
118
+ # SageMath parsed files
119
+ *.sage.py
120
+
121
+ # Environments
122
+ .env
123
+ .venv
124
+ env/
125
+ venv/
126
+ ENV/
127
+ env.bak/
128
+ venv.bak/
129
+
130
+ # Spyder project settings
131
+ .spyderproject
132
+ .spyproject
133
+
134
+ # Rope project settings
135
+ .ropeproject
136
+
137
+ # mkdocs documentation
138
+ /site
139
+
140
+ # mypy
141
+ .mypy_cache/
142
+ .dmypy.json
143
+ dmypy.json
144
+
145
+ # Pyre type checker
146
+ .pyre/
147
+ .vscode/
148
+ # pytype static type analyzer
149
+ .pytype/
150
+
151
+ # Cython debug symbols
152
+ cython_debug/
153
+ archive
154
+ # PyCharm
155
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
156
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
157
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
158
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
159
+ #.idea/
160
+ .*
161
+ !.github/*