tree-again 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 (30) hide show
  1. tree_again-0.1.0/LICENSE +21 -0
  2. tree_again-0.1.0/MANIFEST.in +5 -0
  3. tree_again-0.1.0/PKG-INFO +94 -0
  4. tree_again-0.1.0/README.md +66 -0
  5. tree_again-0.1.0/THIRD_PARTY_NOTICES.md +8 -0
  6. tree_again-0.1.0/licenses/Eigen-NOTICE +421 -0
  7. tree_again-0.1.0/pyproject.toml +38 -0
  8. tree_again-0.1.0/setup.cfg +16 -0
  9. tree_again-0.1.0/setup.py +94 -0
  10. tree_again-0.1.0/src/tree_again/__init__.py +12 -0
  11. tree_again-0.1.0/src/tree_again/clari_tree/LICENSE +21 -0
  12. tree_again-0.1.0/src/tree_again/clari_tree/__init__.py +209 -0
  13. tree_again-0.1.0/src/tree_again/clari_tree/cpp/bindings.cpp +409 -0
  14. tree_again-0.1.0/src/tree_again/clari_tree/cpp/clari_tree.cpp +2140 -0
  15. tree_again-0.1.0/src/tree_again/clari_tree/cpp/clari_tree_const.cpp +1103 -0
  16. tree_again-0.1.0/src/tree_again/clari_tree/cpp/main.cpp +220 -0
  17. tree_again-0.1.0/src/tree_again/clari_tree/include/clari_tree.hpp +297 -0
  18. tree_again-0.1.0/src/tree_again/clari_tree/include/clari_tree_const.hpp +118 -0
  19. tree_again-0.1.0/src/tree_again/mdt.py +5811 -0
  20. tree_again-0.1.0/src/tree_again/sklearndefertree.py +322 -0
  21. tree_again-0.1.0/src/tree_again/weightedseparable/__init__.py +341 -0
  22. tree_again-0.1.0/src/tree_again/weightedseparable/_core.cpp +250 -0
  23. tree_again-0.1.0/src/tree_again/weightedseparable/_threshold_guessing.py +338 -0
  24. tree_again-0.1.0/src/tree_again/weightedseparable/cpp/weightedseparable.cpp +590 -0
  25. tree_again-0.1.0/src/tree_again/wrappers.py +634 -0
  26. tree_again-0.1.0/src/tree_again.egg-info/PKG-INFO +94 -0
  27. tree_again-0.1.0/src/tree_again.egg-info/SOURCES.txt +29 -0
  28. tree_again-0.1.0/src/tree_again.egg-info/dependency_links.txt +1 -0
  29. tree_again-0.1.0/src/tree_again.egg-info/requires.txt +12 -0
  30. tree_again-0.1.0/src/tree_again.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 tree-again contributors
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.
@@ -0,0 +1,5 @@
1
+ recursive-include src *.cpp *.hpp *.h LICENSE
2
+ include README.md
3
+ include LICENSE
4
+ include THIRD_PARTY_NOTICES.md
5
+ recursive-include licenses *
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.4
2
+ Name: tree-again
3
+ Version: 0.1.0
4
+ Summary: Interpretable decision tree chains with black box deferral
5
+ Author: Zakk Heile, Hayden McTavish, Varun Babbar, Margo Seltzer, Cynthia Rudin
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/zakk-h/MDT
8
+ Project-URL: Repository, https://github.com/zakk-h/MDT
9
+ Project-URL: Issues, https://github.com/zakk-h/MDT/issues
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ License-File: THIRD_PARTY_NOTICES.md
14
+ License-File: licenses/Eigen-NOTICE
15
+ License-File: src/tree_again/clari_tree/LICENSE
16
+ Requires-Dist: numpy>=1.23
17
+ Requires-Dist: matplotlib>=3.6
18
+ Requires-Dist: scikit-learn>=1.1
19
+ Requires-Dist: pandas>=1.5
20
+ Requires-Dist: scipy
21
+ Requires-Dist: imodels
22
+ Requires-Dist: interpret
23
+ Requires-Dist: xgboost
24
+ Requires-Dist: licketysplit
25
+ Provides-Extra: tabpfn
26
+ Requires-Dist: tabpfn; extra == "tabpfn"
27
+ Dynamic: license-file
28
+
29
+ # tree-again
30
+
31
+ Interpretable decision tree chains with black box deferral. Includes the
32
+ WeightedSeparable and CLARITree backends in one Python package.
33
+
34
+ ## Installation
35
+
36
+ From a source checkout:
37
+
38
+ ```bash
39
+ python -m pip install .
40
+ ```
41
+
42
+ From PyPI:
43
+
44
+ ```bash
45
+ python -m pip install tree-again
46
+ ```
47
+
48
+ Source installations require a C++17 compiler and Python development headers.
49
+ Pip installs the build dependencies, including pybind11 and Eigen headers.
50
+ Neither a separate CLARITree installation nor CMake is required. Compatible
51
+ prebuilt wheels do not require a compiler on the user's machine.
52
+
53
+ ## Usage
54
+
55
+ ```python
56
+ from tree_again import MDTChain, CLARITree, WeightedSeparable
57
+ ```
58
+
59
+ A small binary classification example:
60
+
61
+ ```python
62
+ import numpy as np
63
+ from tree_again import MDTChain
64
+
65
+ X = np.array([[0, 0], [0, 1], [1, 0], [1, 1]] * 8, dtype=np.uint8)
66
+ y = X[:, 0]
67
+
68
+ model = MDTChain(
69
+ training_method="top_down",
70
+ c=0.5,
71
+ defer_lambda_strength=1.0,
72
+ lambda_leaf=0.001,
73
+ eta_defer=1.0,
74
+ depth_budget=2,
75
+ max_stages=1,
76
+ task="classification",
77
+ random_state=0,
78
+ )
79
+ model.fit(X, y)
80
+ predictions = model.predict(X)
81
+ ```
82
+
83
+ To use CLARITree stages, select `task="linear_regression"` and supply backend
84
+ options through `claritree_params`. CLARITree is included in the same wheel.
85
+ Its direct classes are also available from `tree_again.clari_tree`.
86
+
87
+ TabPFN is optional:
88
+
89
+ ```bash
90
+ python -m pip install 'tree-again[tabpfn]'
91
+ ```
92
+
93
+ Experiment datasets and stored results are not part of this source release.
94
+ The files in `examples/` are preserved experiment scripts, not standalone demos.
@@ -0,0 +1,66 @@
1
+ # tree-again
2
+
3
+ Interpretable decision tree chains with black box deferral. Includes the
4
+ WeightedSeparable and CLARITree backends in one Python package.
5
+
6
+ ## Installation
7
+
8
+ From a source checkout:
9
+
10
+ ```bash
11
+ python -m pip install .
12
+ ```
13
+
14
+ From PyPI:
15
+
16
+ ```bash
17
+ python -m pip install tree-again
18
+ ```
19
+
20
+ Source installations require a C++17 compiler and Python development headers.
21
+ Pip installs the build dependencies, including pybind11 and Eigen headers.
22
+ Neither a separate CLARITree installation nor CMake is required. Compatible
23
+ prebuilt wheels do not require a compiler on the user's machine.
24
+
25
+ ## Usage
26
+
27
+ ```python
28
+ from tree_again import MDTChain, CLARITree, WeightedSeparable
29
+ ```
30
+
31
+ A small binary classification example:
32
+
33
+ ```python
34
+ import numpy as np
35
+ from tree_again import MDTChain
36
+
37
+ X = np.array([[0, 0], [0, 1], [1, 0], [1, 1]] * 8, dtype=np.uint8)
38
+ y = X[:, 0]
39
+
40
+ model = MDTChain(
41
+ training_method="top_down",
42
+ c=0.5,
43
+ defer_lambda_strength=1.0,
44
+ lambda_leaf=0.001,
45
+ eta_defer=1.0,
46
+ depth_budget=2,
47
+ max_stages=1,
48
+ task="classification",
49
+ random_state=0,
50
+ )
51
+ model.fit(X, y)
52
+ predictions = model.predict(X)
53
+ ```
54
+
55
+ To use CLARITree stages, select `task="linear_regression"` and supply backend
56
+ options through `claritree_params`. CLARITree is included in the same wheel.
57
+ Its direct classes are also available from `tree_again.clari_tree`.
58
+
59
+ TabPFN is optional:
60
+
61
+ ```bash
62
+ python -m pip install 'tree-again[tabpfn]'
63
+ ```
64
+
65
+ Experiment datasets and stored results are not part of this source release.
66
+ The files in `examples/` are preserved experiment scripts, not standalone demos.
@@ -0,0 +1,8 @@
1
+ # Third-party code
2
+
3
+ CLARITree is bundled under its original MIT license. Its copyright notice and
4
+ license are retained in `src/tree_again/clari_tree/LICENSE` and included in wheels.
5
+
6
+ Eigen is a build dependency supplied by `cmeel-eigen`; it is not vendored here.
7
+ Eigen notices are retained in `licenses/Eigen-NOTICE`. Eigen headers are used
8
+ when compiling the CLARITree backend.
@@ -0,0 +1,421 @@
1
+ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2
+ Source: http://eigen.tuxfamily.org
3
+
4
+ Files: *
5
+ Copyright: 2006-2013 Benoit Jacob <jacob@math.jussieu.fr>
6
+ 2008-2013 Gael Guennebaud <g.gael@free.fr>
7
+ 2007 Michael Olbrich <michael.olbrich@gmx.net>
8
+ 2008 Konstantinos Margaritis <markos@codex.gr>
9
+ License: MPL-2
10
+
11
+ Files: unsupported/test/mpreal/* unsupported/Eigen/src/IterativeSolvers/* Eigen/src/SparseCholesky/SimplicialCholesky.h Eigen/src/OrderingMethods/Amd.h
12
+ Copyright: 2002-2007 Yves Renard
13
+ 2008-2009 Gael Guennebaud <g.gael@free.fr>
14
+ License: LGPL-2.1+ or MPL-2
15
+
16
+ Files: Eigen/src/Cholesky/LLT_LAPACKE.h Eigen/src/QR/HouseholderQR_LAPACKE.h Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h Eigen/src/LU/arch/Inverse_SSE.h Eigen/src/LU/PartialPivLU_LAPACKE.h Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h Eigen/src/Eigenvalues/RealSchur_LAPACKE.h Eigen/src/PardisoSupport/PardisoSupport.h Eigen/src/misc/lapacke.h Eigen/src/SVD/JacobiSVD_LAPACKE.h Eigen/src/Core/Assign_MKL.h Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h Eigen/src/Core/products/TriangularMatrixVector_BLAS.h Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h Eigen/src/Core/products/GeneralMatrixVector_BLAS.h Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h Eigen/src/Core/util/MKL_support.h doc/UsingBlasLapackBackends.dox doc/UsingIntelMKL.dox
17
+ Copyright: 2011 Intel Corporation
18
+ License: BSD-3-clause
19
+
20
+ License: BSD-3-clause
21
+ Redistribution and use in source and binary forms, with or without modification,
22
+ are permitted provided that the following conditions are met:
23
+ .
24
+ * Redistributions of source code must retain the above copyright notice, this
25
+ list of conditions and the following disclaimer.
26
+ * Redistributions in binary form must reproduce the above copyright notice,
27
+ this list of conditions and the following disclaimer in the documentation
28
+ and/or other materials provided with the distribution.
29
+ * Neither the name of Intel Corporation nor the names of its contributors may
30
+ be used to endorse or promote products derived from this software without
31
+ specific prior written permission.
32
+ .
33
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
34
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
35
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
36
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
37
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
38
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
39
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
40
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
41
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
42
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43
+
44
+ License: LGPL-2.1+
45
+ On Debian systems, the complete text of the GNU Lesser General
46
+ Public License can be found in `/usr/share/common-licenses/LGPL-2.1'.
47
+
48
+ License: MPL-2
49
+ Mozilla Public License Version 2.0
50
+ ==================================
51
+ .
52
+ 1. Definitions
53
+ --------------
54
+ .
55
+ 1.1. "Contributor"
56
+ means each individual or legal entity that creates, contributes to
57
+ the creation of, or owns Covered Software.
58
+ .
59
+ 1.2. "Contributor Version"
60
+ means the combination of the Contributions of others (if any) used
61
+ by a Contributor and that particular Contributor's Contribution.
62
+ .
63
+ 1.3. "Contribution"
64
+ means Covered Software of a particular Contributor.
65
+ .
66
+ 1.4. "Covered Software"
67
+ means Source Code Form to which the initial Contributor has attached
68
+ the notice in Exhibit A, the Executable Form of such Source Code
69
+ Form, and Modifications of such Source Code Form, in each case
70
+ including portions thereof.
71
+ .
72
+ 1.5. "Incompatible With Secondary Licenses"
73
+ means
74
+ .
75
+ (a) that the initial Contributor has attached the notice described
76
+ in Exhibit B to the Covered Software; or
77
+ .
78
+ (b) that the Covered Software was made available under the terms of
79
+ version 1.1 or earlier of the License, but not also under the
80
+ terms of a Secondary License.
81
+ .
82
+ 1.6. "Executable Form"
83
+ means any form of the work other than Source Code Form.
84
+ .
85
+ 1.7. "Larger Work"
86
+ means a work that combines Covered Software with other material, in
87
+ a separate file or files, that is not Covered Software.
88
+ .
89
+ 1.8. "License"
90
+ means this document.
91
+ .
92
+ 1.9. "Licensable"
93
+ means having the right to grant, to the maximum extent possible,
94
+ whether at the time of the initial grant or subsequently, any and
95
+ all of the rights conveyed by this License.
96
+ .
97
+ 1.10. "Modifications"
98
+ means any of the following:
99
+ .
100
+ (a) any file in Source Code Form that results from an addition to,
101
+ deletion from, or modification of the contents of Covered
102
+ Software; or
103
+ .
104
+ (b) any new file in Source Code Form that contains any Covered
105
+ Software.
106
+ .
107
+ 1.11. "Patent Claims" of a Contributor
108
+ means any patent claim(s), including without limitation, method,
109
+ process, and apparatus claims, in any patent Licensable by such
110
+ Contributor that would be infringed, but for the grant of the
111
+ License, by the making, using, selling, offering for sale, having
112
+ made, import, or transfer of either its Contributions or its
113
+ Contributor Version.
114
+ .
115
+ 1.12. "Secondary License"
116
+ means either the GNU General Public License, Version 2.0, the GNU
117
+ Lesser General Public License, Version 2.1, the GNU Affero General
118
+ Public License, Version 3.0, or any later versions of those
119
+ licenses.
120
+ .
121
+ 1.13. "Source Code Form"
122
+ means the form of the work preferred for making modifications.
123
+ .
124
+ 1.14. "You" (or "Your")
125
+ means an individual or a legal entity exercising rights under this
126
+ License. For legal entities, "You" includes any entity that
127
+ controls, is controlled by, or is under common control with You. For
128
+ purposes of this definition, "control" means (a) the power, direct
129
+ or indirect, to cause the direction or management of such entity,
130
+ whether by contract or otherwise, or (b) ownership of more than
131
+ fifty percent (50%) of the outstanding shares or beneficial
132
+ ownership of such entity.
133
+ .
134
+ 2. License Grants and Conditions
135
+ --------------------------------
136
+ .
137
+ 2.1. Grants
138
+ .
139
+ Each Contributor hereby grants You a world-wide, royalty-free,
140
+ non-exclusive license:
141
+ .
142
+ (a) under intellectual property rights (other than patent or trademark)
143
+ Licensable by such Contributor to use, reproduce, make available,
144
+ modify, display, perform, distribute, and otherwise exploit its
145
+ Contributions, either on an unmodified basis, with Modifications, or
146
+ as part of a Larger Work; and
147
+ .
148
+ (b) under Patent Claims of such Contributor to make, use, sell, offer
149
+ for sale, have made, import, and otherwise transfer either its
150
+ Contributions or its Contributor Version.
151
+ .
152
+ 2.2. Effective Date
153
+ .
154
+ The licenses granted in Section 2.1 with respect to any Contribution
155
+ become effective for each Contribution on the date the Contributor first
156
+ distributes such Contribution.
157
+ .
158
+ 2.3. Limitations on Grant Scope
159
+ .
160
+ The licenses granted in this Section 2 are the only rights granted under
161
+ this License. No additional rights or licenses will be implied from the
162
+ distribution or licensing of Covered Software under this License.
163
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
164
+ Contributor:
165
+ .
166
+ (a) for any code that a Contributor has removed from Covered Software;
167
+ or
168
+ .
169
+ (b) for infringements caused by: (i) Your and any other third party's
170
+ modifications of Covered Software, or (ii) the combination of its
171
+ Contributions with other software (except as part of its Contributor
172
+ Version); or
173
+ .
174
+ (c) under Patent Claims infringed by Covered Software in the absence of
175
+ its Contributions.
176
+ .
177
+ This License does not grant any rights in the trademarks, service marks,
178
+ or logos of any Contributor (except as may be necessary to comply with
179
+ the notice requirements in Section 3.4).
180
+ .
181
+ 2.4. Subsequent Licenses
182
+ .
183
+ No Contributor makes additional grants as a result of Your choice to
184
+ distribute the Covered Software under a subsequent version of this
185
+ License (see Section 10.2) or under the terms of a Secondary License (if
186
+ permitted under the terms of Section 3.3).
187
+ .
188
+ 2.5. Representation
189
+ .
190
+ Each Contributor represents that the Contributor believes its
191
+ Contributions are its original creation(s) or it has sufficient rights
192
+ to grant the rights to its Contributions conveyed by this License.
193
+ .
194
+ 2.6. Fair Use
195
+ .
196
+ This License is not intended to limit any rights You have under
197
+ applicable copyright doctrines of fair use, fair dealing, or other
198
+ equivalents.
199
+ .
200
+ 2.7. Conditions
201
+ .
202
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
203
+ in Section 2.1.
204
+ .
205
+ 3. Responsibilities
206
+ -------------------
207
+ .
208
+ 3.1. Distribution of Source Form
209
+ .
210
+ All distribution of Covered Software in Source Code Form, including any
211
+ Modifications that You create or to which You contribute, must be under
212
+ the terms of this License. You must inform recipients that the Source
213
+ Code Form of the Covered Software is governed by the terms of this
214
+ License, and how they can obtain a copy of this License. You may not
215
+ attempt to alter or restrict the recipients' rights in the Source Code
216
+ Form.
217
+ .
218
+ 3.2. Distribution of Executable Form
219
+ .
220
+ If You distribute Covered Software in Executable Form then:
221
+ .
222
+ (a) such Covered Software must also be made available in Source Code
223
+ Form, as described in Section 3.1, and You must inform recipients of
224
+ the Executable Form how they can obtain a copy of such Source Code
225
+ Form by reasonable means in a timely manner, at a charge no more
226
+ than the cost of distribution to the recipient; and
227
+ .
228
+ (b) You may distribute such Executable Form under the terms of this
229
+ License, or sublicense it under different terms, provided that the
230
+ license for the Executable Form does not attempt to limit or alter
231
+ the recipients' rights in the Source Code Form under this License.
232
+ .
233
+ 3.3. Distribution of a Larger Work
234
+ .
235
+ You may create and distribute a Larger Work under terms of Your choice,
236
+ provided that You also comply with the requirements of this License for
237
+ the Covered Software. If the Larger Work is a combination of Covered
238
+ Software with a work governed by one or more Secondary Licenses, and the
239
+ Covered Software is not Incompatible With Secondary Licenses, this
240
+ License permits You to additionally distribute such Covered Software
241
+ under the terms of such Secondary License(s), so that the recipient of
242
+ the Larger Work may, at their option, further distribute the Covered
243
+ Software under the terms of either this License or such Secondary
244
+ License(s).
245
+ .
246
+ 3.4. Notices
247
+ .
248
+ You may not remove or alter the substance of any license notices
249
+ (including copyright notices, patent notices, disclaimers of warranty,
250
+ or limitations of liability) contained within the Source Code Form of
251
+ the Covered Software, except that You may alter any license notices to
252
+ the extent required to remedy known factual inaccuracies.
253
+ .
254
+ 3.5. Application of Additional Terms
255
+ .
256
+ You may choose to offer, and to charge a fee for, warranty, support,
257
+ indemnity or liability obligations to one or more recipients of Covered
258
+ Software. However, You may do so only on Your own behalf, and not on
259
+ behalf of any Contributor. You must make it absolutely clear that any
260
+ such warranty, support, indemnity, or liability obligation is offered by
261
+ You alone, and You hereby agree to indemnify every Contributor for any
262
+ liability incurred by such Contributor as a result of warranty, support,
263
+ indemnity or liability terms You offer. You may include additional
264
+ disclaimers of warranty and limitations of liability specific to any
265
+ jurisdiction.
266
+ .
267
+ 4. Inability to Comply Due to Statute or Regulation
268
+ ---------------------------------------------------
269
+ .
270
+ If it is impossible for You to comply with any of the terms of this
271
+ License with respect to some or all of the Covered Software due to
272
+ statute, judicial order, or regulation then You must: (a) comply with
273
+ the terms of this License to the maximum extent possible; and (b)
274
+ describe the limitations and the code they affect. Such description must
275
+ be placed in a text file included with all distributions of the Covered
276
+ Software under this License. Except to the extent prohibited by statute
277
+ or regulation, such description must be sufficiently detailed for a
278
+ recipient of ordinary skill to be able to understand it.
279
+ .
280
+ 5. Termination
281
+ --------------
282
+ .
283
+ 5.1. The rights granted under this License will terminate automatically
284
+ if You fail to comply with any of its terms. However, if You become
285
+ compliant, then the rights granted under this License from a particular
286
+ Contributor are reinstated (a) provisionally, unless and until such
287
+ Contributor explicitly and finally terminates Your grants, and (b) on an
288
+ ongoing basis, if such Contributor fails to notify You of the
289
+ non-compliance by some reasonable means prior to 60 days after You have
290
+ come back into compliance. Moreover, Your grants from a particular
291
+ Contributor are reinstated on an ongoing basis if such Contributor
292
+ notifies You of the non-compliance by some reasonable means, this is the
293
+ first time You have received notice of non-compliance with this License
294
+ from such Contributor, and You become compliant prior to 30 days after
295
+ Your receipt of the notice.
296
+ .
297
+ 5.2. If You initiate litigation against any entity by asserting a patent
298
+ infringement claim (excluding declaratory judgment actions,
299
+ counter-claims, and cross-claims) alleging that a Contributor Version
300
+ directly or indirectly infringes any patent, then the rights granted to
301
+ You by any and all Contributors for the Covered Software under Section
302
+ 2.1 of this License shall terminate.
303
+ .
304
+ 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
305
+ end user license agreements (excluding distributors and resellers) which
306
+ have been validly granted by You or Your distributors under this License
307
+ prior to termination shall survive termination.
308
+ .
309
+ ************************************************************************
310
+ * *
311
+ * 6. Disclaimer of Warranty *
312
+ * ------------------------- *
313
+ * *
314
+ * Covered Software is provided under this License on an "as is" *
315
+ * basis, without warranty of any kind, either expressed, implied, or *
316
+ * statutory, including, without limitation, warranties that the *
317
+ * Covered Software is free of defects, merchantable, fit for a *
318
+ * particular purpose or non-infringing. The entire risk as to the *
319
+ * quality and performance of the Covered Software is with You. *
320
+ * Should any Covered Software prove defective in any respect, You *
321
+ * (not any Contributor) assume the cost of any necessary servicing, *
322
+ * repair, or correction. This disclaimer of warranty constitutes an *
323
+ * essential part of this License. No use of any Covered Software is *
324
+ * authorized under this License except under this disclaimer. *
325
+ * *
326
+ ************************************************************************
327
+ .
328
+ ************************************************************************
329
+ * *
330
+ * 7. Limitation of Liability *
331
+ * -------------------------- *
332
+ * *
333
+ * Under no circumstances and under no legal theory, whether tort *
334
+ * (including negligence), contract, or otherwise, shall any *
335
+ * Contributor, or anyone who distributes Covered Software as *
336
+ * permitted above, be liable to You for any direct, indirect, *
337
+ * special, incidental, or consequential damages of any character *
338
+ * including, without limitation, damages for lost profits, loss of *
339
+ * goodwill, work stoppage, computer failure or malfunction, or any *
340
+ * and all other commercial damages or losses, even if such party *
341
+ * shall have been informed of the possibility of such damages. This *
342
+ * limitation of liability shall not apply to liability for death or *
343
+ * personal injury resulting from such party's negligence to the *
344
+ * extent applicable law prohibits such limitation. Some *
345
+ * jurisdictions do not allow the exclusion or limitation of *
346
+ * incidental or consequential damages, so this exclusion and *
347
+ * limitation may not apply to You. *
348
+ * *
349
+ ************************************************************************
350
+ .
351
+ 8. Litigation
352
+ -------------
353
+ .
354
+ Any litigation relating to this License may be brought only in the
355
+ courts of a jurisdiction where the defendant maintains its principal
356
+ place of business and such litigation shall be governed by laws of that
357
+ jurisdiction, without reference to its conflict-of-law provisions.
358
+ Nothing in this Section shall prevent a party's ability to bring
359
+ cross-claims or counter-claims.
360
+ .
361
+ 9. Miscellaneous
362
+ ----------------
363
+ .
364
+ This License represents the complete agreement concerning the subject
365
+ matter hereof. If any provision of this License is held to be
366
+ unenforceable, such provision shall be reformed only to the extent
367
+ necessary to make it enforceable. Any law or regulation which provides
368
+ that the language of a contract shall be construed against the drafter
369
+ shall not be used to construe this License against a Contributor.
370
+ .
371
+ 10. Versions of the License
372
+ ---------------------------
373
+ .
374
+ 10.1. New Versions
375
+ .
376
+ Mozilla Foundation is the license steward. Except as provided in Section
377
+ 10.3, no one other than the license steward has the right to modify or
378
+ publish new versions of this License. Each version will be given a
379
+ distinguishing version number.
380
+ .
381
+ 10.2. Effect of New Versions
382
+ .
383
+ You may distribute the Covered Software under the terms of the version
384
+ of the License under which You originally received the Covered Software,
385
+ or under the terms of any subsequent version published by the license
386
+ steward.
387
+ .
388
+ 10.3. Modified Versions
389
+ .
390
+ If you create software not governed by this License, and you want to
391
+ create a new license for such software, you may create and use a
392
+ modified version of this License if you rename the license and remove
393
+ any references to the name of the license steward (except to note that
394
+ such modified license differs from this License).
395
+ .
396
+ 10.4. Distributing Source Code Form that is Incompatible With Secondary
397
+ Licenses
398
+ .
399
+ If You choose to distribute Source Code Form that is Incompatible With
400
+ Secondary Licenses under the terms of this version of the License, the
401
+ notice described in Exhibit B of this License must be attached.
402
+ .
403
+ Exhibit A - Source Code Form License Notice
404
+ -------------------------------------------
405
+ .
406
+ This Source Code Form is subject to the terms of the Mozilla Public
407
+ License, v. 2.0. If a copy of the MPL was not distributed with this
408
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
409
+ .
410
+ If it is not possible or desirable to put the notice in a particular
411
+ file, then You may include the notice in a location (such as a LICENSE
412
+ file in a relevant directory) where a recipient would be likely to look
413
+ for such a notice.
414
+ .
415
+ You may add additional accurate notices of copyright ownership.
416
+ .
417
+ Exhibit B - "Incompatible With Secondary Licenses" Notice
418
+ ---------------------------------------------------------
419
+ .
420
+ This Source Code Form is "Incompatible With Secondary Licenses", as
421
+ defined by the Mozilla Public License, v. 2.0.
@@ -0,0 +1,38 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77", "wheel", "pybind11>=2.13", "numpy>=1.23", "cmeel-eigen>=3.4,<4"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "tree-again"
7
+ version = "0.1.0"
8
+ description = "Interpretable decision tree chains with black box deferral"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = "MIT"
12
+ license-files = ["LICENSE", "THIRD_PARTY_NOTICES.md", "licenses/*", "src/tree_again/clari_tree/LICENSE"]
13
+ authors = [
14
+ { name = "Zakk Heile" },
15
+ { name = "Hayden McTavish" },
16
+ { name = "Varun Babbar" },
17
+ { name = "Margo Seltzer" },
18
+ { name = "Cynthia Rudin" }
19
+ ]
20
+ dependencies = [
21
+ "numpy>=1.23",
22
+ "matplotlib>=3.6",
23
+ "scikit-learn>=1.1",
24
+ "pandas>=1.5",
25
+ "scipy",
26
+ "imodels",
27
+ "interpret",
28
+ "xgboost",
29
+ "licketysplit"
30
+ ]
31
+
32
+ [project.optional-dependencies]
33
+ tabpfn = ["tabpfn"]
34
+
35
+ [project.urls]
36
+ Homepage = "https://github.com/zakk-h/MDT"
37
+ Repository = "https://github.com/zakk-h/MDT"
38
+ Issues = "https://github.com/zakk-h/MDT/issues"
@@ -0,0 +1,16 @@
1
+ [metadata]
2
+ name = tree-again
3
+
4
+ [options]
5
+ package_dir =
6
+ = src
7
+ packages = find:
8
+ include_package_data = True
9
+
10
+ [options.packages.find]
11
+ where = src
12
+
13
+ [egg_info]
14
+ tag_build =
15
+ tag_date = 0
16
+