sklearn-morpho 0.2.2__tar.gz → 0.2.4__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.
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/.SRCINFO +4 -4
- sklearn_morpho-0.2.4/.gitattributes +1 -0
- sklearn_morpho-0.2.2/.github/workflows/ci.yml → sklearn_morpho-0.2.4/.github/workflows/code_quality.yml +26 -42
- sklearn_morpho-0.2.4/.github/workflows/docs.yml +55 -0
- sklearn_morpho-0.2.2/.github/workflows/pypi-publish.yml → sklearn_morpho-0.2.4/.github/workflows/pypi_publish.yml +8 -2
- sklearn_morpho-0.2.4/.github/workflows/tests.yml +72 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/.gitignore +4 -1
- sklearn_morpho-0.2.4/MREs/DEP.ipynb +2435 -0
- sklearn_morpho-0.2.4/MREs/l-DEP.ipynb +2458 -0
- sklearn_morpho-0.2.4/MREs/simple_perceptron.ipynb +1339 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/MREs/train_multiclass.ipynb +402 -80
- sklearn_morpho-0.2.4/PKG-INFO +33 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/PKGBUILD +3 -3
- sklearn_morpho-0.2.4/README-PyPI.md +16 -0
- sklearn_morpho-0.2.4/README.md +102 -0
- sklearn_morpho-0.2.4/pyproject.toml +130 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/__init__.py +5 -1
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/classifiers/__init__.py +1 -1
- sklearn_morpho-0.2.2/src/sklearn_morpho/classifiers/rdep.py → sklearn_morpho-0.2.4/src/sklearn_morpho/classifiers/dep.py +97 -65
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/classifiers/ldep.py +67 -54
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/classifiers/simple_perceptron.py +91 -58
- sklearn_morpho-0.2.4/src/sklearn_morpho/inversion/__init__.py +3 -0
- sklearn_morpho-0.2.4/src/sklearn_morpho/inversion/inversion_base.py +18 -0
- sklearn_morpho-0.2.4/src/sklearn_morpho/inversion/inversion_centroid.py +38 -0
- sklearn_morpho-0.2.4/src/sklearn_morpho/inversion/inversion_none.py +12 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/stopping/stopping_cost.py +1 -1
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/stopping/stopping_early.py +1 -1
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/stopping/stopping_epoch.py +1 -1
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/training/__init__.py +2 -1
- sklearn_morpho-0.2.2/src/sklearn_morpho/training/dccp_rdep.py → sklearn_morpho-0.2.4/src/sklearn_morpho/training/dccp_dep.py +51 -40
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/training/dccp_ldep.py +38 -17
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/training/dccp_simple_perceptron.py +50 -28
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/training/dccp_wrapper.py +70 -57
- sklearn_morpho-0.2.4/src/sklearn_morpho/utils/__init__.py +1 -0
- sklearn_morpho-0.2.4/src/sklearn_morpho/utils/perceptron_kind.py +11 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/weighting/weighting_base.py +6 -7
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/testing/compare_estimators.py +54 -46
- sklearn_morpho-0.2.4/testing/compare_estimators_multiprocess.py +376 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/testing/compare_estimators_show.py +35 -22
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/testing/display_boundary.py +6 -6
- sklearn_morpho-0.2.4/tests/integration/sklearn_test.py +34 -0
- sklearn_morpho-0.2.4/tests/inversion/centroid_test.py +26 -0
- sklearn_morpho-0.2.4/tests/inversion/no_test.py +12 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/tests/stopping/cost_test.py +3 -3
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/tests/stopping/early_test.py +4 -4
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/tests/stopping/epoch_test.py +3 -3
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/tests/stopping/train_stop_test.py +3 -3
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/tests/training/friendly_dataset.py +2 -2
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/tests/training/test_dccp_wrapper.py +20 -23
- sklearn_morpho-0.2.4/tests/training/test_dep.py +100 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/tests/training/test_ldep.py +16 -16
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/tests/training/test_simple_perceptron.py +30 -28
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/tests/weighting/dist_test.py +5 -5
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/tests/weighting/none_test.py +7 -7
- sklearn_morpho-0.2.2/MREs/l-DEP.ipynb +0 -1075
- sklearn_morpho-0.2.2/MREs/r-DEP.ipynb +0 -1074
- sklearn_morpho-0.2.2/MREs/simple_perceptron.ipynb +0 -1061
- sklearn_morpho-0.2.2/PKG-INFO +0 -10
- sklearn_morpho-0.2.2/README.md +0 -56
- sklearn_morpho-0.2.2/pyproject.toml +0 -49
- sklearn_morpho-0.2.2/tests/integration/sklearn_test.py +0 -23
- sklearn_morpho-0.2.2/tests/training/test_rdep.py +0 -100
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/.gitlab-ci.yml +0 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/.qbuild/scripts/coverage +0 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/.qbuild/scripts/main +0 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/.qbuild/scripts/tests +0 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/LICENSE +0 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/check_todos.sh +0 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/pkgbuild_helper.sh +0 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/pyrightconfig.json +0 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/stopping/__init__.py +0 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/stopping/stopping_base.py +0 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/stopping/stopping_train_stop.py +0 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/weighting/__init__.py +0 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/weighting/weighting_dist.py +0 -0
- {sklearn_morpho-0.2.2 → sklearn_morpho-0.2.4}/src/sklearn_morpho/weighting/weighting_none.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
pkgbase = python-sklearn-morpho
|
|
2
2
|
pkgdesc = Scikit-learn estimator toolbox for morphological perceptrons
|
|
3
|
-
pkgver = 0.2.
|
|
3
|
+
pkgver = 0.2.3
|
|
4
4
|
pkgrel = 1
|
|
5
5
|
url = https://github.com/d-002/sklearn-morpho
|
|
6
6
|
arch = any
|
|
@@ -11,9 +11,9 @@ pkgbase = python-sklearn-morpho
|
|
|
11
11
|
makedepends = python-hatchling
|
|
12
12
|
depends = python
|
|
13
13
|
depends = python-cvxpy
|
|
14
|
-
depends = python-
|
|
14
|
+
depends = python-numpy
|
|
15
15
|
depends = python-scikit-learn
|
|
16
|
-
source = https://files.pythonhosted.org/packages/source/s/sklearn_morpho/sklearn_morpho-0.2.
|
|
17
|
-
sha256sums =
|
|
16
|
+
source = https://files.pythonhosted.org/packages/source/s/sklearn_morpho/sklearn_morpho-0.2.3.tar.gz
|
|
17
|
+
sha256sums = a0451822efbfef83e45940560560eae443fb7bbb045167b66b9d53a09656c0af
|
|
18
18
|
|
|
19
19
|
pkgname = python-sklearn-morpho
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*.ipynb linguist-vendored
|
|
@@ -1,36 +1,30 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Code quality
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches: [ "master" ]
|
|
6
6
|
pull_request:
|
|
7
|
-
branches: [ "
|
|
7
|
+
branches: [ "master" ]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: "code quality"
|
|
12
|
+
cancel-in-progress: true
|
|
8
13
|
|
|
9
14
|
jobs:
|
|
10
|
-
|
|
11
|
-
name:
|
|
12
|
-
runs-on:
|
|
13
|
-
strategy:
|
|
14
|
-
matrix:
|
|
15
|
-
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
|
15
|
+
todo:
|
|
16
|
+
name: Check for TODOs in code
|
|
17
|
+
runs-on: ubuntu-latest
|
|
16
18
|
|
|
17
19
|
steps:
|
|
18
20
|
- name: Checkout repository
|
|
19
21
|
uses: actions/checkout@v4
|
|
20
22
|
|
|
21
|
-
- name:
|
|
22
|
-
|
|
23
|
-
with:
|
|
24
|
-
python-version: "3.13"
|
|
25
|
-
|
|
26
|
-
- name: Install Hatch
|
|
27
|
-
run: python -m pip install hatch
|
|
28
|
-
|
|
29
|
-
- name: Run tests
|
|
30
|
-
run: hatch run pytest
|
|
23
|
+
- name: Scan for TODOs in the code
|
|
24
|
+
run: ./check_todos.sh
|
|
31
25
|
|
|
32
|
-
|
|
33
|
-
name:
|
|
26
|
+
types:
|
|
27
|
+
name: Check for typing errors
|
|
34
28
|
runs-on: ubuntu-latest
|
|
35
29
|
|
|
36
30
|
steps:
|
|
@@ -41,35 +35,23 @@ jobs:
|
|
|
41
35
|
uses: actions/setup-python@v5
|
|
42
36
|
with:
|
|
43
37
|
python-version: "3.13"
|
|
38
|
+
cache: "pip"
|
|
39
|
+
cache-dependency-path: "pyproject.toml"
|
|
44
40
|
|
|
45
41
|
- name: Install Hatch
|
|
46
|
-
run:
|
|
47
|
-
|
|
48
|
-
- name: Install coverage utilities
|
|
49
|
-
run: python -m pip install coverage
|
|
50
|
-
|
|
51
|
-
- name: Check coverage
|
|
52
|
-
run: |
|
|
53
|
-
hatch run pytest --cov --cov-fail-under=90
|
|
54
|
-
|
|
55
|
-
todo:
|
|
56
|
-
name: Check for TODOs in code
|
|
57
|
-
runs-on: ubuntu-latest
|
|
42
|
+
run: pip install -U pip hatch
|
|
58
43
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
uses: actions/checkout@v4
|
|
62
|
-
|
|
63
|
-
- name: Scan for TODOs in the code
|
|
64
|
-
run: ./check_todos.sh
|
|
44
|
+
- name: Run mypy through hatch
|
|
45
|
+
run: hatch run mypy:mypy src tests testing
|
|
65
46
|
|
|
66
|
-
|
|
47
|
+
lint:
|
|
67
48
|
name: Check for ${{ matrix.name }} errors
|
|
68
49
|
runs-on: ubuntu-latest
|
|
69
50
|
strategy:
|
|
51
|
+
fail-fast: false
|
|
70
52
|
matrix:
|
|
71
53
|
include:
|
|
72
|
-
- name: "linting"
|
|
54
|
+
- name: "generic linting"
|
|
73
55
|
command: "python -m ruff check"
|
|
74
56
|
- name: "coding style"
|
|
75
57
|
command: "[ -z \"$(python -m ruff format | grep reformatted)\" ]"
|
|
@@ -82,9 +64,11 @@ jobs:
|
|
|
82
64
|
uses: actions/setup-python@v5
|
|
83
65
|
with:
|
|
84
66
|
python-version: "3.13"
|
|
67
|
+
cache: "pip"
|
|
68
|
+
cache-dependency-path: "pyproject.toml"
|
|
85
69
|
|
|
86
70
|
- name: Install linter
|
|
87
|
-
run:
|
|
71
|
+
run: pip install -U pip ruff
|
|
88
72
|
|
|
89
|
-
- name: Run linter for
|
|
73
|
+
- name: Run linter for ${{ matrix.name }} errors
|
|
90
74
|
run: ${{ matrix.command }}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: Deploy docs to GitHub Pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [ published ]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: "deploy-docs"
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
deploy:
|
|
19
|
+
environment:
|
|
20
|
+
name: github-pages
|
|
21
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout repository
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
|
|
28
|
+
- name: Create staging directory
|
|
29
|
+
run: mkdir -p dist
|
|
30
|
+
|
|
31
|
+
- name: Set up Python
|
|
32
|
+
uses: actions/setup-python@v5
|
|
33
|
+
with:
|
|
34
|
+
python-version: "3.13"
|
|
35
|
+
cache: "pip"
|
|
36
|
+
|
|
37
|
+
- name: Install dependencies
|
|
38
|
+
run: pip install -U pip hatch
|
|
39
|
+
|
|
40
|
+
- name: Generate Python backend docs
|
|
41
|
+
run: |
|
|
42
|
+
hatch run pdoc:pdoc -o docs src/sklearn_morpho
|
|
43
|
+
mv docs dist
|
|
44
|
+
|
|
45
|
+
- name: Setup Pages
|
|
46
|
+
uses: actions/configure-pages@v5
|
|
47
|
+
|
|
48
|
+
- name: Upload Artifact
|
|
49
|
+
uses: actions/upload-pages-artifact@v3
|
|
50
|
+
with:
|
|
51
|
+
path: "./dist"
|
|
52
|
+
|
|
53
|
+
- name: Deploy to GitHub Pages
|
|
54
|
+
id: deployment
|
|
55
|
+
uses: actions/deploy-pages@v4
|
|
@@ -3,12 +3,16 @@ name: Publish to PyPI
|
|
|
3
3
|
on:
|
|
4
4
|
release:
|
|
5
5
|
types: [ published ]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: "deploy-pypi"
|
|
10
|
+
cancel-in-progress: true
|
|
6
11
|
|
|
7
12
|
jobs:
|
|
8
13
|
deploy:
|
|
9
14
|
runs-on: ubuntu-latest
|
|
10
15
|
environment: pypi
|
|
11
|
-
|
|
12
16
|
permissions:
|
|
13
17
|
id-token: write
|
|
14
18
|
contents: read
|
|
@@ -20,7 +24,9 @@ jobs:
|
|
|
20
24
|
- name: Set up Python
|
|
21
25
|
uses: actions/setup-python@v5
|
|
22
26
|
with:
|
|
23
|
-
python-version:
|
|
27
|
+
python-version: "3.13"
|
|
28
|
+
cache: "pip"
|
|
29
|
+
cache-dependency-path: "pyproject.toml"
|
|
24
30
|
|
|
25
31
|
- name: Install Hatch
|
|
26
32
|
run: pip install -U pip hatch
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: Testsuite
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "master" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ "master" ]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: "testsuite"
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
test:
|
|
16
|
+
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
os: [ "ubuntu-latest" ]
|
|
22
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
23
|
+
# also test on other OSes, but not for all versions to save minutes
|
|
24
|
+
include:
|
|
25
|
+
- os: windows-latest
|
|
26
|
+
python-version: "3.13"
|
|
27
|
+
- os: macos-latest
|
|
28
|
+
python-version: "3.13"
|
|
29
|
+
|
|
30
|
+
steps:
|
|
31
|
+
- name: Checkout repository
|
|
32
|
+
uses: actions/checkout@v4
|
|
33
|
+
|
|
34
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
35
|
+
uses: actions/setup-python@v5
|
|
36
|
+
with:
|
|
37
|
+
python-version: ${{ matrix.python-version }}
|
|
38
|
+
cache: "pip"
|
|
39
|
+
cache-dependency-path: "pyproject.toml"
|
|
40
|
+
|
|
41
|
+
- name: Install dependencies
|
|
42
|
+
run: pip install -U pip hatch mypy
|
|
43
|
+
|
|
44
|
+
- name: Run tests with Hatch
|
|
45
|
+
run: |
|
|
46
|
+
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
|
|
47
|
+
hatch run test.py${{ matrix.python-version }}:pytest
|
|
48
|
+
else
|
|
49
|
+
hatch run pytest
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
coverage:
|
|
53
|
+
name: Coverage test (ignore failed tests)
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
|
|
56
|
+
steps:
|
|
57
|
+
- name: Checkout repository
|
|
58
|
+
uses: actions/checkout@v4
|
|
59
|
+
|
|
60
|
+
- name: Set up Python
|
|
61
|
+
uses: actions/setup-python@v5
|
|
62
|
+
with:
|
|
63
|
+
python-version: "3.13"
|
|
64
|
+
cache: "pip"
|
|
65
|
+
cache-dependency-path: "pyproject.toml"
|
|
66
|
+
|
|
67
|
+
- name: Install dependencies
|
|
68
|
+
run: pip install -U pip hatch coverage
|
|
69
|
+
|
|
70
|
+
- name: Check coverage
|
|
71
|
+
run: |
|
|
72
|
+
hatch run pytest --cov --cov-fail-under=90
|