sklearn-morpho 0.1.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 (33) hide show
  1. sklearn_morpho-0.1.0/.github/workflows/ci.yml +26 -0
  2. sklearn_morpho-0.1.0/.github/workflows/pypi-publish.yml +32 -0
  3. sklearn_morpho-0.1.0/.gitignore +25 -0
  4. sklearn_morpho-0.1.0/.gitlab-ci.yml +26 -0
  5. sklearn_morpho-0.1.0/.qbuild/scripts/main +1 -0
  6. sklearn_morpho-0.1.0/.qbuild/scripts/tests +1 -0
  7. sklearn_morpho-0.1.0/LICENSE +21 -0
  8. sklearn_morpho-0.1.0/MREs/train_multiclass.ipynb +956 -0
  9. sklearn_morpho-0.1.0/MREs/train_two_moons.ipynb +1045 -0
  10. sklearn_morpho-0.1.0/PKG-INFO +4 -0
  11. sklearn_morpho-0.1.0/README.md +36 -0
  12. sklearn_morpho-0.1.0/pyproject.toml +28 -0
  13. sklearn_morpho-0.1.0/pyrightconfig.json +4 -0
  14. sklearn_morpho-0.1.0/src/sklearn_morpho/__init__.py +3 -0
  15. sklearn_morpho-0.1.0/src/sklearn_morpho/classifiers/ldep.py +172 -0
  16. sklearn_morpho-0.1.0/src/sklearn_morpho/dccp/dccp_ldep.py +162 -0
  17. sklearn_morpho-0.1.0/src/sklearn_morpho/dccp/dccp_wrapper.py +225 -0
  18. sklearn_morpho-0.1.0/src/sklearn_morpho/stopping/__init__.py +5 -0
  19. sklearn_morpho-0.1.0/src/sklearn_morpho/stopping/stopping_base.py +20 -0
  20. sklearn_morpho-0.1.0/src/sklearn_morpho/stopping/stopping_cost.py +21 -0
  21. sklearn_morpho-0.1.0/src/sklearn_morpho/stopping/stopping_early.py +35 -0
  22. sklearn_morpho-0.1.0/src/sklearn_morpho/stopping/stopping_epoch.py +21 -0
  23. sklearn_morpho-0.1.0/src/sklearn_morpho/stopping/stopping_train_stop.py +15 -0
  24. sklearn_morpho-0.1.0/src/sklearn_morpho/tests/moons_test.py +28 -0
  25. sklearn_morpho-0.1.0/src/sklearn_morpho/tests/sklearn_test.py +19 -0
  26. sklearn_morpho-0.1.0/src/sklearn_morpho/tests/train_test.py +17 -0
  27. sklearn_morpho-0.1.0/src/sklearn_morpho/weighting/__init__.py +3 -0
  28. sklearn_morpho-0.1.0/src/sklearn_morpho/weighting/weighting_base.py +45 -0
  29. sklearn_morpho-0.1.0/src/sklearn_morpho/weighting/weighting_dist.py +33 -0
  30. sklearn_morpho-0.1.0/src/sklearn_morpho/weighting/weighting_none.py +14 -0
  31. sklearn_morpho-0.1.0/testing/compare_estimators.py +142 -0
  32. sklearn_morpho-0.1.0/testing/compare_estimators_show.py +82 -0
  33. sklearn_morpho-0.1.0/testing/display_boundary.py +71 -0
@@ -0,0 +1,26 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ "**" ]
6
+ pull_request:
7
+ branches: [ "**" ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout repository
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: '3.14'
21
+
22
+ - name: Install Hatch
23
+ run: pip install -U pip hatch
24
+
25
+ - name: Run tests
26
+ run: hatch run pytest
@@ -0,0 +1,32 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [ published ]
6
+
7
+ jobs:
8
+ deploy:
9
+ runs-on: ubuntu-latest
10
+ environment: pypi
11
+
12
+ permissions:
13
+ id-token: write
14
+ contents: read
15
+
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: '3.14'
24
+
25
+ - name: Install Hatch
26
+ run: pip install -U pip hatch
27
+
28
+ - name: Build package
29
+ run: hatch build
30
+
31
+ - name: Publish package to PyPI
32
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,25 @@
1
+ # python
2
+ __pycache__
3
+ venv
4
+ *.pyc
5
+
6
+ # vim
7
+ *.swp
8
+ *~
9
+
10
+ # hatch
11
+ dist
12
+ .hatch
13
+ .venv
14
+
15
+ # dccp
16
+ dccp.log
17
+
18
+ # datasets
19
+ WDBC.dat.txt
20
+
21
+ # comparison
22
+ comparison_data.json
23
+
24
+ # jupyter
25
+ .ipynb_checkpoints
@@ -0,0 +1,26 @@
1
+ variables:
2
+ PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
3
+ HATCH_DATA_DIR: "$CI_PROJECT_DIR/.hatch-data"
4
+ PIP_ROOT_USER_ACTION: "ignore"
5
+ HATCH_ENV_TYPE_VIRTUAL_PATH: ".venv"
6
+
7
+ cache:
8
+ key:
9
+ files:
10
+ - pyproject.toml
11
+ prefix: "$CI_COMMIT_REF_SLUG"
12
+ paths:
13
+ - .cache/pip
14
+ - .hatch-data
15
+ - .venv
16
+ policy: pull-push
17
+
18
+ image: python:3.14-slim
19
+
20
+ before_script:
21
+ - pip install --cache-dir .cache/pip hatch
22
+
23
+ test:
24
+ stage: test
25
+ script:
26
+ - hatch run pytest
@@ -0,0 +1 @@
1
+ hatch run boundary
@@ -0,0 +1 @@
1
+ hatch run pytest
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.