hugiml-core 1.0.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 (68) hide show
  1. hugiml_core-1.0.0/CONTRIBUTING.md +132 -0
  2. hugiml_core-1.0.0/LICENSE +182 -0
  3. hugiml_core-1.0.0/MANIFEST.in +25 -0
  4. hugiml_core-1.0.0/NOTICE +54 -0
  5. hugiml_core-1.0.0/PKG-INFO +328 -0
  6. hugiml_core-1.0.0/README.md +267 -0
  7. hugiml_core-1.0.0/benchmarks/baseline.json +55 -0
  8. hugiml_core-1.0.0/benchmarks/bench_core.py +216 -0
  9. hugiml_core-1.0.0/benchmarks/bench_regression.py +289 -0
  10. hugiml_core-1.0.0/docker/Dockerfile +89 -0
  11. hugiml_core-1.0.0/docs/model_card_template.md +123 -0
  12. hugiml_core-1.0.0/kubernetes/deployment.yaml +254 -0
  13. hugiml_core-1.0.0/native/bind_build_matrix.cpp +93 -0
  14. hugiml_core-1.0.0/native/bind_helpers.hpp +108 -0
  15. hugiml_core-1.0.0/native/bind_mine_patterns.cpp +48 -0
  16. hugiml_core-1.0.0/native/bind_openmp.cpp +43 -0
  17. hugiml_core-1.0.0/native/bind_pattern.cpp +33 -0
  18. hugiml_core-1.0.0/native/bind_prepare_tx.cpp +67 -0
  19. hugiml_core-1.0.0/native/bind_transaction.cpp +51 -0
  20. hugiml_core-1.0.0/native/bindings.cpp +32 -0
  21. hugiml_core-1.0.0/native/discretization.cpp +83 -0
  22. hugiml_core-1.0.0/native/discretization.hpp +37 -0
  23. hugiml_core-1.0.0/native/math.cpp +129 -0
  24. hugiml_core-1.0.0/native/math.hpp +88 -0
  25. hugiml_core-1.0.0/native/matrix.cpp +214 -0
  26. hugiml_core-1.0.0/native/matrix.hpp +38 -0
  27. hugiml_core-1.0.0/native/mining.cpp +344 -0
  28. hugiml_core-1.0.0/native/mining.hpp +123 -0
  29. hugiml_core-1.0.0/native/pybind_common.hpp +36 -0
  30. hugiml_core-1.0.0/native/transaction.cpp +429 -0
  31. hugiml_core-1.0.0/native/transaction.hpp +135 -0
  32. hugiml_core-1.0.0/pyproject.toml +189 -0
  33. hugiml_core-1.0.0/scripts/build_wheels.sh +36 -0
  34. hugiml_core-1.0.0/scripts/generate_sbom.py +40 -0
  35. hugiml_core-1.0.0/scripts/run_benchmarks.sh +39 -0
  36. hugiml_core-1.0.0/scripts/wheel_smoke_test.py +165 -0
  37. hugiml_core-1.0.0/setup.cfg +4 -0
  38. hugiml_core-1.0.0/setup.py +256 -0
  39. hugiml_core-1.0.0/src/hugiml/__init__.py +123 -0
  40. hugiml_core-1.0.0/src/hugiml/_compat.py +121 -0
  41. hugiml_core-1.0.0/src/hugiml/calibration.py +317 -0
  42. hugiml_core-1.0.0/src/hugiml/classifier.py +1677 -0
  43. hugiml_core-1.0.0/src/hugiml/exceptions.py +146 -0
  44. hugiml_core-1.0.0/src/hugiml/explainability.py +478 -0
  45. hugiml_core-1.0.0/src/hugiml/governance.py +479 -0
  46. hugiml_core-1.0.0/src/hugiml/monitoring.py +383 -0
  47. hugiml_core-1.0.0/src/hugiml/py.typed +0 -0
  48. hugiml_core-1.0.0/src/hugiml/serialization.py +859 -0
  49. hugiml_core-1.0.0/src/hugiml/telemetry.py +350 -0
  50. hugiml_core-1.0.0/src/hugiml_core.egg-info/PKG-INFO +328 -0
  51. hugiml_core-1.0.0/src/hugiml_core.egg-info/SOURCES.txt +66 -0
  52. hugiml_core-1.0.0/src/hugiml_core.egg-info/dependency_links.txt +1 -0
  53. hugiml_core-1.0.0/src/hugiml_core.egg-info/requires.txt +37 -0
  54. hugiml_core-1.0.0/src/hugiml_core.egg-info/top_level.txt +2 -0
  55. hugiml_core-1.0.0/tests/__init__.py +13 -0
  56. hugiml_core-1.0.0/tests/conftest.py +248 -0
  57. hugiml_core-1.0.0/tests/test_calibration.py +186 -0
  58. hugiml_core-1.0.0/tests/test_classifier.py +480 -0
  59. hugiml_core-1.0.0/tests/test_drift.py +291 -0
  60. hugiml_core-1.0.0/tests/test_explainability.py +230 -0
  61. hugiml_core-1.0.0/tests/test_governance.py +205 -0
  62. hugiml_core-1.0.0/tests/test_integration.py +212 -0
  63. hugiml_core-1.0.0/tests/test_monitoring.py +196 -0
  64. hugiml_core-1.0.0/tests/test_property_based.py +247 -0
  65. hugiml_core-1.0.0/tests/test_serialization.py +395 -0
  66. hugiml_core-1.0.0/tests/test_sklearn_compat.py +307 -0
  67. hugiml_core-1.0.0/tests/test_stress.py +782 -0
  68. hugiml_core-1.0.0/tests/test_telemetry.py +154 -0
@@ -0,0 +1,132 @@
1
+ # Contributing to hugiml-core
2
+
3
+ Thank you for your interest in contributing to **hugiml-core** — the high-performance
4
+ interpretable rule-based ML infrastructure library built on the
5
+ [HUG-IML IEEE Access paper](https://doi.org/10.1109/ACCESS.2024.3455563).
6
+
7
+ ---
8
+
9
+ ## Before You Start
10
+
11
+ This project is maintained by **Srikumar Krishnamoorthy** ([@srikumar2050](https://github.com/srikumar2050)).
12
+ All contributions — code, documentation, tests, benchmarks — are welcome and reviewed
13
+ on a best-effort basis.
14
+
15
+ By submitting a pull request you agree to the terms of the
16
+ [Developer Certificate of Origin (DCO)](https://developercertificate.org/) and that
17
+ your contribution will be licensed under the
18
+ [Apache License 2.0](LICENSE).
19
+
20
+ ---
21
+
22
+ ## Developer Certificate of Origin (DCO)
23
+
24
+ Every commit must be signed off with:
25
+
26
+ ```
27
+ Signed-off-by: Your Name <your@email.com>
28
+ ```
29
+
30
+ Add `-s` to your `git commit` command, or configure Git globally:
31
+
32
+ ```bash
33
+ git config --global user.name "Your Name"
34
+ git config --global user.email "your@email.com"
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Getting Started
40
+
41
+ ```bash
42
+ # Clone the repository
43
+ git clone https://github.com/srikumar2050/hugiml-core.git
44
+ cd hugiml-core
45
+
46
+ # Create a virtual environment
47
+ python -m venv .venv && source .venv/bin/activate
48
+
49
+ # Install in editable mode with all dev extras
50
+ pip install -e ".[dev]"
51
+
52
+ # Build the C++ extension (requires a C++17 compiler)
53
+ python setup.py build_ext --inplace
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Running the Test Suite
59
+
60
+ ```bash
61
+ # Fast unit tests (no native extension required for pure-Python paths)
62
+ pytest tests/ -v -m "not integration and not stress"
63
+
64
+ # Full suite including real-dataset integration tests
65
+ pytest tests/ -v
66
+
67
+ # Stress tests (memory, concurrency)
68
+ pytest tests/test_stress.py -v -m stress
69
+ ```
70
+
71
+ Coverage must stay at or above **80%**. Check locally with:
72
+
73
+ ```bash
74
+ pytest --cov=hugiml --cov-report=term-missing tests/
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Code Style
80
+
81
+ ```bash
82
+ # Linting
83
+ ruff check src/ tests/ benchmarks/
84
+
85
+ # Type checking
86
+ mypy src/hugiml/
87
+
88
+ # Auto-format
89
+ ruff format src/ tests/ benchmarks/
90
+ ```
91
+
92
+ All checks run automatically in CI on every pull request.
93
+
94
+ ---
95
+
96
+ ## Pull Request Guidelines
97
+
98
+ 1. **Fork** the repository and create a branch from `main`.
99
+ 2. Write tests that cover your change. All new behaviour should have at least
100
+ one test.
101
+ 3. Keep pull requests focused — one logical change per PR.
102
+ 4. Update docstrings and `docs/` if you change public API.
103
+ 5. Ensure CI passes before requesting a review.
104
+ 6. Do not bump version numbers in PRs; releases are managed by the maintainer.
105
+
106
+ ---
107
+
108
+ ## Reporting Issues
109
+
110
+ Please open a [GitHub Issue](https://github.com/srikumar2050/hugiml-core/issues)
111
+ and include:
112
+
113
+ - Python version and OS
114
+ - hugiml-core version (`python -c "import hugiml; print(hugiml.__version__)"`)
115
+ - Minimal reproducible example
116
+ - Full traceback
117
+
118
+ ---
119
+
120
+ ## Security Issues
121
+
122
+ Do **not** open a public issue for security vulnerabilities.
123
+ Email the maintainer directly (see the GitHub profile) with subject
124
+ `[hugiml-core] Security`.
125
+
126
+ ---
127
+
128
+ ## License
129
+
130
+ All contributions must be compatible with [Apache 2.0](LICENSE).
131
+ Do not introduce code, data, or dependencies that carry GPL, AGPL,
132
+ LGPL, CC-NC, or similarly restrictive terms.
@@ -0,0 +1,182 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship made available under
36
+ the License, as indicated by a copyright notice that is included in
37
+ or attached to the work (an example is provided in the Appendix below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean, as submitted to the Licensor for inclusion
48
+ in the Work by the copyright owner or by an individual or Legal Entity
49
+ authorized to submit on behalf of the copyright owner. For the purposes
50
+ of this definition, "submitted" means any form of electronic, verbal,
51
+ or written communication sent to the Licensor or its representatives,
52
+ including but not limited to communication on electronic mailing lists,
53
+ source code control systems, and issue tracking systems that are managed
54
+ by, or on behalf of, the Licensor for the purpose of discussing and
55
+ improving the Work, but excluding communication that is conspicuously
56
+ marked or otherwise designated in writing by the copyright owner as
57
+ "Not a Contribution."
58
+
59
+ "Contributor" shall mean Licensor and any Legal Entity on behalf of
60
+ whom a Contribution has been received by the Licensor and included
61
+ within the Work.
62
+
63
+ 2. Grant of Copyright License. Subject to the terms and conditions of
64
+ this License, each Contributor hereby grants to You a perpetual,
65
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
66
+ copyright license to reproduce, prepare Derivative Works of,
67
+ publicly display, publicly perform, sublicense, and distribute the
68
+ Work and such Derivative Works in Source or Object form.
69
+
70
+ 3. Grant of Patent License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ (except as stated in this section) patent license to make, have made,
74
+ use, offer to sell, sell, import, and otherwise transfer the Work,
75
+ where such license applies only to those patent claims licensable
76
+ by such Contributor that are necessarily infringed by their
77
+ Contribution(s) alone or by the combination of their Contribution(s)
78
+ with the Work to which such Contribution(s) was submitted. If You
79
+ institute patent litigation against any entity (including a cross-claim
80
+ or counterclaim in a lawsuit) alleging that the Work or any Contribution
81
+ embodied within the Work constitutes direct or contributory patent
82
+ infringement, then any patent licenses granted to You under this License
83
+ for that Work shall terminate as of the date such litigation is filed.
84
+
85
+ 4. Redistribution. You may reproduce and distribute copies of the
86
+ Work or Derivative Works thereof in any medium, with or without
87
+ modifications, and in Source or Object form, provided that You
88
+ meet the following conditions:
89
+
90
+ (a) You must give any other recipients of the Work or
91
+ Derivative Works a copy of this License; and
92
+
93
+ (b) You must cause any modified files to carry prominent notices
94
+ stating that You changed the files; and
95
+
96
+ (c) You must retain, in the Source form of any Derivative Works
97
+ that You distribute, all copyright, patent, trademark, and
98
+ attribution notices from the Source form of the Work,
99
+ excluding those notices that do not pertain to any part of
100
+ the Derivative Works; and
101
+
102
+ (d) If the Work includes a "NOTICE" text file as part of its
103
+ distribution, You must include a readable copy of the
104
+ attribution notices contained within such NOTICE file, in
105
+ at least one of the following places: within a NOTICE text
106
+ file distributed as part of the Derivative Works; within
107
+ the Source form or documentation, if provided along with the
108
+ Derivative Works; or, within a display generated by the
109
+ Derivative Works, if and wherever such third-party notices
110
+ normally appear. The contents of the NOTICE file are for
111
+ informational purposes only and do not modify the License.
112
+ You may add Your own attribution notices within Derivative
113
+ Works that You distribute, alongside or as an addendum to
114
+ the NOTICE text from the Work, provided that such additional
115
+ attribution notices cannot be construed as modifying the License.
116
+
117
+ You may add Your own license statement for Your modifications and
118
+ may provide additional grant of rights to use, copy, modify, merge,
119
+ publish, distribute, sublicense, and/or sell copies of the
120
+ Contribution.
121
+
122
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
123
+ any Contribution intentionally submitted for inclusion in the Work
124
+ by You to the Licensor shall be under the terms and conditions of
125
+ this License, without any additional terms or conditions.
126
+ Notwithstanding the above, nothing herein shall supersede or modify
127
+ the terms of any separate license agreement you may have executed
128
+ with Licensor regarding such Contributions.
129
+
130
+ 6. Trademarks. This License does not grant permission to use the trade
131
+ names, trademarks, service marks, or product names of the Licensor,
132
+ except as required for reasonable and customary use in describing the
133
+ origin of the Work and reproducing the content of the NOTICE file.
134
+
135
+ 7. Disclaimer of Warranty. Unless required by applicable law or
136
+ agreed to in writing, Licensor provides the Work (and each
137
+ Contributor provides its Contributions) on an "AS IS" BASIS,
138
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
139
+ implied, including, without limitation, any warranties or conditions
140
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
141
+ PARTICULAR PURPOSE. You are solely responsible for determining the
142
+ appropriateness of using or reproducing the Work and assume any
143
+ risks associated with Your exercise of permissions under this License.
144
+
145
+ 8. Limitation of Liability. In no event and under no legal theory,
146
+ whether in tort (including negligence), contract, or otherwise,
147
+ unless required by applicable law (such as deliberate and grossly
148
+ negligent acts) or agreed to in writing, shall any Contributor be
149
+ liable to You for damages, including any direct, indirect, special,
150
+ incidental, or exemplary damages of any character arising as a
151
+ result of this License or out of the use or inability to use the
152
+ Work (including but not limited to damages for loss of goodwill,
153
+ work stoppage, computer failure or malfunction, or all other
154
+ commercial damages or losses), even if such Contributor has been
155
+ advised of the possibility of such damages.
156
+
157
+ 9. Accepting Warranty or Liability. While redistributing the Work or
158
+ Derivative Works thereof, You may choose to offer, and charge a fee
159
+ for, acceptance of support, warranty, indemnity, or other liability
160
+ obligations and/or rights consistent with this License. However, in
161
+ accepting such obligations, You may offer such conditions only on
162
+ Your own behalf and on Your sole responsibility, not on behalf of
163
+ any other Contributor, and only if You agree to indemnify, defend,
164
+ and hold each Contributor harmless for any liability incurred by,
165
+ or claims asserted against, such Contributor by reason of your
166
+ accepting any warranty or additional liability.
167
+
168
+ END OF TERMS AND CONDITIONS
169
+
170
+ Copyright 2026 Srikumar Krishnamoorthy
171
+
172
+ Licensed under the Apache License, Version 2.0 (the "License");
173
+ you may not use this file except in compliance with the License.
174
+ You may obtain a copy of the License at
175
+
176
+ http://www.apache.org/licenses/LICENSE-2.0
177
+
178
+ Unless required by applicable law or agreed to in writing, software
179
+ distributed under the License is distributed on an "AS IS" BASIS,
180
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
181
+ See the License for the specific language governing permissions and
182
+ limitations under the License.
@@ -0,0 +1,25 @@
1
+ include LICENSE
2
+ include NOTICE
3
+ include README.md
4
+ include CONTRIBUTING.md
5
+ include pyproject.toml
6
+ include setup.py
7
+
8
+ recursive-include native *.cpp *.hpp
9
+ recursive-include src/hugiml *.py py.typed
10
+ recursive-include tests *.py
11
+ recursive-include benchmarks *.py *.json
12
+ recursive-include docs *.md
13
+ recursive-include docker Dockerfile*
14
+ recursive-include kubernetes *.yaml
15
+ recursive-include scripts *.py *.sh
16
+
17
+ exclude build/
18
+ exclude dist/
19
+ exclude *.egg-info/
20
+ global-exclude __pycache__/
21
+ global-exclude *.py[cod]
22
+ global-exclude .DS_Store
23
+ global-exclude *.so
24
+ global-exclude *.pyd
25
+ global-exclude *.gch
@@ -0,0 +1,54 @@
1
+ hugiml-core
2
+ ===========
3
+
4
+ Copyright 2026 Srikumar Krishnamoorthy
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this file except in compliance with the License.
8
+ You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+
18
+
19
+ Scientific Reference
20
+ --------------------
21
+ The algorithms implemented in this package are described in:
22
+
23
+ Krishnamoorthy, S. (2024). "Interpretable Classifier Models for Decision
24
+ Support Using High Utility Gain Patterns." IEEE Access, 12, 126088–126107.
25
+ DOI: 10.1109/ACCESS.2024.3455563
26
+
27
+ Third-Party Dependencies
28
+ ------------------------
29
+ This software depends on the following third-party packages, each governed
30
+ by its own license:
31
+
32
+ numpy — BSD 3-Clause License
33
+ https://numpy.org/
34
+ scipy — BSD 3-Clause License
35
+ https://scipy.org/
36
+ scikit-learn — BSD 3-Clause License
37
+ https://scikit-learn.org/
38
+ pandas — BSD 3-Clause License
39
+ https://pandas.pydata.org/
40
+ pybind11 — BSD 3-Clause License (build-time only)
41
+ https://github.com/pybind/pybind11
42
+
43
+ Optional integrations (not bundled):
44
+ opentelemetry-api — Apache License 2.0
45
+ prometheus-client — Apache License 2.0
46
+ shap — MIT License
47
+
48
+ All of the above licenses are compatible with the Apache License 2.0 under
49
+ which this package is distributed.
50
+
51
+ Provenance
52
+ ----------
53
+ Source repository: https://github.com/srikumar2050/hugiml-core
54
+ Primary maintainer: Srikumar Krishnamoorthy