structureboost 0.4.7__tar.gz → 0.6.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 (48) hide show
  1. {structureboost-0.4.7 → structureboost-0.6.0}/LICENSE +2 -2
  2. {structureboost-0.4.7 → structureboost-0.6.0}/PKG-INFO +19 -17
  3. structureboost-0.6.0/README.md +23 -0
  4. structureboost-0.6.0/pyproject.toml +30 -0
  5. {structureboost-0.4.7 → structureboost-0.6.0}/setup.py +1 -45
  6. {structureboost-0.4.7 → structureboost-0.6.0}/structureboost/__init__.py +3 -3
  7. structureboost-0.6.0/structureboost/coarsage.c +33060 -0
  8. structureboost-0.6.0/structureboost/graphs.c +41692 -0
  9. structureboost-0.6.0/structureboost/pdf_discrete.c +22471 -0
  10. structureboost-0.6.0/structureboost/pdf_group.c +21156 -0
  11. structureboost-0.6.0/structureboost/prob_regr_unit.c +11203 -0
  12. structureboost-0.6.0/structureboost/prob_regressor.c +22001 -0
  13. {structureboost-0.4.7 → structureboost-0.6.0}/structureboost/structure_dt.c +52538 -46869
  14. structureboost-0.6.0/structureboost/structure_dt_multi.c +20255 -0
  15. {structureboost-0.4.7 → structureboost-0.6.0}/structureboost/structure_gb.c +46608 -39752
  16. structureboost-0.6.0/structureboost/structure_gb_multi.c +46704 -0
  17. structureboost-0.6.0/structureboost/tests/__init__.py +0 -0
  18. structureboost-0.6.0/structureboost/tests/test_basics.py +55 -0
  19. structureboost-0.6.0/structureboost/tests/test_coarsage_1.py +77 -0
  20. structureboost-0.6.0/structureboost/tests/test_dt.py +24 -0
  21. structureboost-0.6.0/structureboost/tests/test_gb.py +312 -0
  22. structureboost-0.6.0/structureboost/tests/test_graphs.py +57 -0
  23. structureboost-0.6.0/structureboost/tests/test_multi_1.py +208 -0
  24. structureboost-0.6.0/structureboost/tests/test_pdfgroup1.py +20 -0
  25. structureboost-0.6.0/structureboost/tests/test_predict_options.py +87 -0
  26. structureboost-0.6.0/structureboost/tests/test_prob_reg_1.py +58 -0
  27. structureboost-0.6.0/structureboost/tests/test_shap.py +118 -0
  28. {structureboost-0.4.7 → structureboost-0.6.0}/structureboost.egg-info/PKG-INFO +19 -17
  29. {structureboost-0.4.7 → structureboost-0.6.0}/structureboost.egg-info/SOURCES.txt +13 -4
  30. structureboost-0.6.0/structureboost.egg-info/requires.txt +11 -0
  31. {structureboost-0.4.7 → structureboost-0.6.0}/structureboost.egg-info/top_level.txt +0 -2
  32. structureboost-0.4.7/pyproject.toml +0 -2
  33. structureboost-0.4.7/structureboost/coarsage.c +0 -28006
  34. structureboost-0.4.7/structureboost/graphs.c +0 -36216
  35. structureboost-0.4.7/structureboost/pdf_discrete.c +0 -17515
  36. structureboost-0.4.7/structureboost/pdf_group.c +0 -15908
  37. structureboost-0.4.7/structureboost/prob_regr_unit.c +0 -7801
  38. structureboost-0.4.7/structureboost/prob_regressor.c +0 -17129
  39. structureboost-0.4.7/structureboost/structure_dt_multi.c +0 -15627
  40. structureboost-0.4.7/structureboost/structure_gb_multi.c +0 -39766
  41. structureboost-0.4.7/structureboost/structure_rf.c +0 -18182
  42. structureboost-0.4.7/structureboost/structure_rfdt.c +0 -17163
  43. structureboost-0.4.7/structureboost.egg-info/not-zip-safe +0 -1
  44. structureboost-0.4.7/structureboost.egg-info/requires.txt +0 -6
  45. {structureboost-0.4.7 → structureboost-0.6.0}/README.rst +0 -0
  46. {structureboost-0.4.7 → structureboost-0.6.0}/setup.cfg +0 -0
  47. {structureboost-0.4.7 → structureboost-0.6.0}/structureboost/utils.py +0 -0
  48. {structureboost-0.4.7 → structureboost-0.6.0}/structureboost.egg-info/dependency_links.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 numeristical
3
+ Copyright (c) 2025 Brian Lucena
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
@@ -1,23 +1,25 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: structureboost
3
- Version: 0.4.7
4
- Summary: StructureBoost is a Python package for gradient boosting using categorical structure. See documentation at: https://structureboost.readthedocs.io/
5
- Home-page: https://github.com/numeristical/structureboost
6
- Author: Brian Lucena
7
- Author-email: brianlucena@gmail.com
8
- License: MIT
9
- Classifier: Development Status :: 2 - Pre-Alpha
10
- Classifier: Intended Audience :: Developers
11
- Classifier: License :: OSI Approved :: MIT License
12
- Classifier: Natural Language :: English
3
+ Version: 0.6.0
4
+ Summary: Gradient Boosting and Probabilistic Regression with categorical structure
5
+ Author-email: Brian Lucena <brian@numeristical.com>
6
+ License-Expression: MIT
13
7
  Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.5
15
- Classifier: Programming Language :: Python :: 3.6
16
- Classifier: Programming Language :: Python :: 3.7
17
- Classifier: Programming Language :: Python :: 3.8
18
- Classifier: Programming Language :: Python :: 3.9
19
- Requires-Python: >=3.5
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.8
10
+ Description-Content-Type: text/markdown
20
11
  License-File: LICENSE
12
+ Requires-Dist: pandas>=1.3
13
+ Requires-Dist: numpy>=1.23.5
14
+ Requires-Dist: scipy>=1.6
15
+ Requires-Dist: matplotlib>=1.0
16
+ Requires-Dist: joblib>=0.14.1
17
+ Requires-Dist: ml_insights>=1.0.5
18
+ Provides-Extra: dev
19
+ Requires-Dist: Cython>=3.1.0b1; extra == "dev"
20
+ Requires-Dist: build; extra == "dev"
21
+ Requires-Dist: setuptools; extra == "dev"
22
+ Dynamic: license-file
21
23
 
22
24
  # StructureBoost
23
25
 
@@ -0,0 +1,23 @@
1
+ # StructureBoost
2
+
3
+ StructureBoost is a package to do Gradient Boosting in a manner that exploits the **structure** of categorical variables.
4
+
5
+ Have you ever used "US state" as a variable in a prediction problem and thought "Why can't my algorithm use the geography of the states to make better predictions?"
6
+
7
+ Or you've used the month of the year as a predictor, but noticed that January should border December the same way that June borders July. (or hour of the day, or day of the week)
8
+
9
+ StructureBoost can help. Read the documentation and references below. Or dive into some [examples](https://github.com/numeristical/structureboost/tree/master/examples)
10
+
11
+ ## Video Lectures
12
+
13
+ There are some explanatory videos on the [Numeristical Youtube Channel](https://www.youtube.com/channel/UCfsbASar8nsLs4NbhQwuaVg)
14
+
15
+
16
+ ## Documentation
17
+ [Read the Docs](https://structureboost.readthedocs.io/)
18
+
19
+ ## References:
20
+
21
+ Lucena, B. "Exploiting Categorical Structure with Tree-Based Methods. Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics, PMLR 108:2949-2958, 2020. [http://proceedings.mlr.press/v108/lucena20a/lucena20a.pdf](http://proceedings.mlr.press/v108/lucena20a/lucena20a.pdf)
22
+
23
+ Lucena, B. "StructureBoost: Efficient Gradient Boosting for Structured Categorical Variables." [https://arxiv.org/abs/2007.04446](https://arxiv.org/abs/2007.04446)
@@ -0,0 +1,30 @@
1
+ [project]
2
+
3
+
4
+ name = "structureboost"
5
+ version = "0.6.0"
6
+ dependencies = ["pandas>=1.3",
7
+ "numpy>=1.23.5",
8
+ "scipy>=1.6",
9
+ "matplotlib>=1.0",
10
+ "joblib>=0.14.1",
11
+ "ml_insights>=1.0.5"
12
+ ]
13
+ authors = [
14
+ { name="Brian Lucena", email="brian@numeristical.com" },
15
+ ]
16
+ description = "Gradient Boosting and Probabilistic Regression with categorical structure"
17
+ readme = "README.md"
18
+ requires-python = ">=3.8"
19
+ classifiers = [
20
+ "Programming Language :: Python :: 3",
21
+ "Operating System :: OS Independent",
22
+ ]
23
+ license = "MIT"
24
+ license-files = ["LICEN[CS]E*"]
25
+
26
+ [project.optional-dependencies]
27
+ dev = ["Cython>=3.1.0b1", "build", "setuptools"]
28
+
29
+ [build-system]
30
+ requires = ["setuptools", "wheel", "Cython>=3.1.0b1","numpy>=2.0.0","scipy>=1.15",]
@@ -1,48 +1,16 @@
1
1
  """Setup for the structureboost package."""
2
2
 
3
3
  from setuptools import Extension, setup
4
+ from Cython.Build import cythonize
4
5
  import numpy
5
6
 
6
- with open('README.md') as f:
7
- README = f.read()
8
-
9
- requirements = [
10
- "pandas>=1.0",
11
- "numpy>=1.16, <2",
12
- "scipy>=1.3",
13
- "matplotlib>=1.0",
14
- "joblib>=0.14.1",
15
- "ml_insights>=1.0.0"
16
- ]
17
-
18
7
  setup(
19
- author="Brian Lucena",
20
- author_email="brianlucena@gmail.com",
21
- name='structureboost',
22
- license="MIT",
23
- license_files=['LICENSE'],
24
- description="StructureBoost is a Python package for gradient boosting using categorical structure. See documentation at: https://structureboost.readthedocs.io/",
25
- version='0.4.7',
26
- long_description=README,
27
- zip_safe=False,
28
- url='https://github.com/numeristical/structureboost',
29
- packages=['structureboost'],
30
- package_dir={'structureboost':
31
- 'structureboost'},
32
- python_requires=">=3.5",
33
- install_requires=requirements,
34
8
  ext_modules=[Extension("graphs",
35
9
  ["structureboost/graphs.c"],
36
10
  include_dirs=[numpy.get_include()]),
37
11
  Extension("structure_dt",
38
12
  ["structureboost/structure_dt.c"],
39
13
  include_dirs=[numpy.get_include()]),
40
- Extension("structure_rfdt",
41
- ["structureboost/structure_rfdt.c"],
42
- include_dirs=[numpy.get_include()]),
43
- Extension("structure_rf",
44
- ["structureboost/structure_rf.c"],
45
- include_dirs=[numpy.get_include()]),
46
14
  Extension("structure_gb",
47
15
  ["structureboost/structure_gb.c"],
48
16
  include_dirs=[numpy.get_include()]),
@@ -67,16 +35,4 @@ setup(
67
35
  Extension("structure_dt_multi",
68
36
  ["structureboost/structure_dt_multi.c"],
69
37
  include_dirs=[numpy.get_include()])],
70
- classifiers=[
71
- 'Development Status :: 2 - Pre-Alpha',
72
- 'Intended Audience :: Developers',
73
- 'License :: OSI Approved :: MIT License',
74
- 'Natural Language :: English',
75
- 'Programming Language :: Python :: 3',
76
- 'Programming Language :: Python :: 3.5',
77
- 'Programming Language :: Python :: 3.6',
78
- 'Programming Language :: Python :: 3.7',
79
- 'Programming Language :: Python :: 3.8',
80
- 'Programming Language :: Python :: 3.9',
81
- ]
82
38
  )
@@ -5,8 +5,8 @@ from structure_gb import StructureBoost
5
5
  from structure_gb_multi import StructureBoostMulti
6
6
  from structure_dt import StructureDecisionTree
7
7
  from structure_dt_multi import StructureDecisionTreeMulti
8
- from structure_rf import StructureRF
9
- from structure_rfdt import StructureRFDecisionTree
8
+ # from structure_rf import StructureRF
9
+ # from structure_rfdt import StructureRFDecisionTree
10
10
  from prob_regr_unit import ProbRegressorUnit
11
11
  from prob_regressor import PrestoBoost
12
12
  from coarsage import Coarsage
@@ -14,4 +14,4 @@ from pdf_discrete import PdfDiscrete, average_densities
14
14
  from pdf_group import PdfGroup, log_loss_pdf, test_between_quantiles_pdf, test_in_pred_regions
15
15
  from .utils import get_basic_config, apply_defaults, default_config_dict, ice_plot, log_loss
16
16
 
17
- __version__ = '0.4.7'
17
+ __version__ = '0.6.0'