linearboost 0.1.9__tar.gz → 0.2.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.
- linearboost-0.2.0/.github/social-preview.png +0 -0
- linearboost-0.2.0/.github/workflows/ci.yml +39 -0
- linearboost-0.2.0/.gitignore +142 -0
- linearboost-0.2.0/.pre-commit-config.yaml +25 -0
- linearboost-0.2.0/LICENSE +21 -0
- {linearboost-0.1.9 → linearboost-0.2.0}/PKG-INFO +30 -3
- {linearboost-0.1.9 → linearboost-0.2.0}/README.md +28 -1
- linearboost-0.2.0/notebooks/demo_linearboost_usage.ipynb +1699 -0
- linearboost-0.2.0/notebooks/demo_sefrboost_usage.ipynb +208 -0
- linearboost-0.2.0/src/linearboost/__init__.py +12 -0
- linearboost-0.2.0/src/linearboost/sefr_boost.py +675 -0
- linearboost-0.2.0/tests/__init__.py +0 -0
- linearboost-0.2.0/tests/_utils.py +19 -0
- linearboost-0.2.0/tests/test_linearboost.py +860 -0
- linearboost-0.2.0/tests/test_sefr.py +535 -0
- {linearboost-0.1.9 → linearboost-0.2.0}/uv.lock +7 -7
- linearboost-0.1.9/LICENSE.txt +0 -29
- linearboost-0.1.9/src/linearboost/__init__.py +0 -9
- {linearboost-0.1.9 → linearboost-0.2.0}/SECURITY.md +0 -0
- {linearboost-0.1.9 → linearboost-0.2.0}/pyproject.toml +0 -0
- {linearboost-0.1.9 → linearboost-0.2.0}/requirements.txt +0 -0
- {linearboost-0.1.9 → linearboost-0.2.0}/src/linearboost/_utils.py +0 -0
- {linearboost-0.1.9 → linearboost-0.2.0/src/linearboost}/licenses/BSD-3-Clause.txt +0 -0
- {linearboost-0.1.9 → linearboost-0.2.0}/src/linearboost/linear_boost.py +0 -0
- {linearboost-0.1.9 → linearboost-0.2.0}/src/linearboost/sefr.py +0 -0
|
Binary file
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
workflow_call:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python-version }}
|
|
25
|
+
|
|
26
|
+
- name: Set up uv
|
|
27
|
+
uses: astral-sh/setup-uv@v5
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: uv sync
|
|
31
|
+
|
|
32
|
+
- name: Run ruff linter
|
|
33
|
+
run: uv run ruff check --output-format=github .
|
|
34
|
+
|
|
35
|
+
- name: Run ruff format check
|
|
36
|
+
run: uv run ruff format --check --diff .
|
|
37
|
+
|
|
38
|
+
- name: Run tests
|
|
39
|
+
run: uv run pytest -vv
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
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
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
95
|
+
__pypackages__/
|
|
96
|
+
|
|
97
|
+
# Celery stuff
|
|
98
|
+
celerybeat-schedule
|
|
99
|
+
celerybeat.pid
|
|
100
|
+
|
|
101
|
+
# SageMath parsed files
|
|
102
|
+
*.sage.py
|
|
103
|
+
|
|
104
|
+
# Environments
|
|
105
|
+
.env
|
|
106
|
+
.venv
|
|
107
|
+
env/
|
|
108
|
+
venv/
|
|
109
|
+
ENV/
|
|
110
|
+
env.bak/
|
|
111
|
+
venv.bak/
|
|
112
|
+
benchmark/
|
|
113
|
+
|
|
114
|
+
# Spyder project settings
|
|
115
|
+
.spyderproject
|
|
116
|
+
.spyproject
|
|
117
|
+
|
|
118
|
+
# Rope project settings
|
|
119
|
+
.ropeproject
|
|
120
|
+
|
|
121
|
+
# mkdocs documentation
|
|
122
|
+
/site
|
|
123
|
+
|
|
124
|
+
# mypy
|
|
125
|
+
.mypy_cache/
|
|
126
|
+
.dmypy.json
|
|
127
|
+
dmypy.json
|
|
128
|
+
|
|
129
|
+
# Pyre type checker
|
|
130
|
+
.pyre/
|
|
131
|
+
|
|
132
|
+
#PyCharm
|
|
133
|
+
.idea/
|
|
134
|
+
catboost_info/catboost_training.json
|
|
135
|
+
catboost_info/learn/events.out.tfevents
|
|
136
|
+
catboost_info/learn_error.tsv
|
|
137
|
+
catboost_info/time_left.tsv
|
|
138
|
+
notebooks/catboost_info/catboost_training.json
|
|
139
|
+
notebooks/catboost_info/learn/events.out.tfevents
|
|
140
|
+
notebooks/catboost_info/learn_error.tsv
|
|
141
|
+
notebooks/catboost_info/time_left.tsv
|
|
142
|
+
.DS_Store
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
default_language_version:
|
|
2
|
+
python: python3.10
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
6
|
+
rev: v5.0.0
|
|
7
|
+
hooks:
|
|
8
|
+
- id: check-added-large-files
|
|
9
|
+
- id: check-toml
|
|
10
|
+
- id: check-yaml
|
|
11
|
+
- id: end-of-file-fixer
|
|
12
|
+
- id: trailing-whitespace
|
|
13
|
+
|
|
14
|
+
- repo: https://github.com/pycqa/isort
|
|
15
|
+
rev: 6.0.1
|
|
16
|
+
hooks:
|
|
17
|
+
- id: isort
|
|
18
|
+
|
|
19
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
20
|
+
rev: v0.11.12
|
|
21
|
+
hooks:
|
|
22
|
+
- id: ruff
|
|
23
|
+
args:
|
|
24
|
+
- --fix
|
|
25
|
+
- id: ruff-format
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Hamidreza Keshavarz, Reza Rawassizadeh
|
|
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.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: linearboost
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: LinearBoost Classifier is a rapid and accurate classification algorithm that builds upon a very fast, linear classifier.
|
|
5
5
|
Project-URL: Homepage, https://github.com/LinearBoost/linearboost-classifier
|
|
6
6
|
Project-URL: Documentation, https://linearboost.readthedocs.io
|
|
7
7
|
Project-URL: Repository, https://github.com/LinearBoost/linearboost-classifier
|
|
8
8
|
Project-URL: Issues, https://github.com/LinearBoost/linearboost-classifier/issues
|
|
9
9
|
Author-email: Hamidreza Keshavarz <hamid9@outlook.com>, Reza Rawassizadeh <rezar@bu.edu>
|
|
10
|
-
License-File: LICENSE
|
|
10
|
+
License-File: LICENSE
|
|
11
11
|
Keywords: adaboost,boost,boosting,classification,classifier,linear
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -26,11 +26,13 @@ Description-Content-Type: text/markdown
|
|
|
26
26
|
|
|
27
27
|
# LinearBoost Classifier
|
|
28
28
|
|
|
29
|
-

|
|
30
30
|
[](https://pypi.org/project/linearboost/)
|
|
31
31
|

|
|
32
32
|
[](https://pepy.tech/projects/linearboost)
|
|
33
33
|
|
|
34
|
+
**Current release: v0.2.0.** This version adds **SEFRBoost**—gradient boosting with linear SEFR splits at tree nodes—via `SEFRBoostClassifier` and `SEFRBoostRegressor` (`from linearboost import …` or `linearboost.sefr_boost`). **LinearBoost security issues have been updated** in this release; upgrade from earlier versions to stay patched.
|
|
35
|
+
|
|
34
36
|
## 🧪 Quickstart Demo
|
|
35
37
|
|
|
36
38
|
Want to see how LinearBoost works in practice?
|
|
@@ -58,6 +60,31 @@ Key Features:
|
|
|
58
60
|
|
|
59
61
|
---
|
|
60
62
|
|
|
63
|
+
## 🚀 New in Version 0.2.0
|
|
64
|
+
|
|
65
|
+
### SEFRBoost
|
|
66
|
+
|
|
67
|
+
SEFRBoost provides binary classification and regression with shallow trees whose internal nodes use **SEFR** hyperplane splits on pseudo-residuals—an oblique-split GBDT-style alternative that lives alongside `LinearBoostClassifier`.
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
from linearboost import SEFRBoostClassifier, SEFRBoostRegressor
|
|
71
|
+
# or: from linearboost.sefr_boost import SEFRBoostClassifier, SEFRBoostRegressor
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Security updates
|
|
75
|
+
|
|
76
|
+
LinearBoost-related security issues are addressed in v0.2.0. Upgrade from older releases.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 🚀 New in Version 0.1.9
|
|
81
|
+
|
|
82
|
+
### Security Updates
|
|
83
|
+
|
|
84
|
+
Version 0.1.9 included security updates. For the latest fixes, use **v0.2.0** or newer.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
61
88
|
## 🚀 New in Version 0.1.7
|
|
62
89
|
|
|
63
90
|
### Gradient Boosting Mode
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# LinearBoost Classifier
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|
[](https://pypi.org/project/linearboost/)
|
|
5
5
|

|
|
6
6
|
[](https://pepy.tech/projects/linearboost)
|
|
7
7
|
|
|
8
|
+
**Current release: v0.2.0.** This version adds **SEFRBoost**—gradient boosting with linear SEFR splits at tree nodes—via `SEFRBoostClassifier` and `SEFRBoostRegressor` (`from linearboost import …` or `linearboost.sefr_boost`). **LinearBoost security issues have been updated** in this release; upgrade from earlier versions to stay patched.
|
|
9
|
+
|
|
8
10
|
## 🧪 Quickstart Demo
|
|
9
11
|
|
|
10
12
|
Want to see how LinearBoost works in practice?
|
|
@@ -32,6 +34,31 @@ Key Features:
|
|
|
32
34
|
|
|
33
35
|
---
|
|
34
36
|
|
|
37
|
+
## 🚀 New in Version 0.2.0
|
|
38
|
+
|
|
39
|
+
### SEFRBoost
|
|
40
|
+
|
|
41
|
+
SEFRBoost provides binary classification and regression with shallow trees whose internal nodes use **SEFR** hyperplane splits on pseudo-residuals—an oblique-split GBDT-style alternative that lives alongside `LinearBoostClassifier`.
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from linearboost import SEFRBoostClassifier, SEFRBoostRegressor
|
|
45
|
+
# or: from linearboost.sefr_boost import SEFRBoostClassifier, SEFRBoostRegressor
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Security updates
|
|
49
|
+
|
|
50
|
+
LinearBoost-related security issues are addressed in v0.2.0. Upgrade from older releases.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 🚀 New in Version 0.1.9
|
|
55
|
+
|
|
56
|
+
### Security Updates
|
|
57
|
+
|
|
58
|
+
Version 0.1.9 included security updates. For the latest fixes, use **v0.2.0** or newer.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
35
62
|
## 🚀 New in Version 0.1.7
|
|
36
63
|
|
|
37
64
|
### Gradient Boosting Mode
|