aplr 10.7.4__cp312-cp312-macosx_11_0_arm64.whl → 10.9.0__cp312-cp312-macosx_11_0_arm64.whl
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.
Potentially problematic release.
This version of aplr might be problematic. Click here for more details.
- aplr/aplr.py +14 -2
- {aplr-10.7.4.dist-info → aplr-10.9.0.dist-info}/METADATA +15 -3
- aplr-10.9.0.dist-info/RECORD +8 -0
- {aplr-10.7.4.dist-info → aplr-10.9.0.dist-info}/WHEEL +1 -1
- aplr_cpp.cpython-312-darwin.so +0 -0
- aplr-10.7.4.dist-info/RECORD +0 -8
- {aplr-10.7.4.dist-info → aplr-10.9.0.dist-info/licenses}/LICENSE +0 -0
- {aplr-10.7.4.dist-info → aplr-10.9.0.dist-info}/top_level.txt +0 -0
aplr/aplr.py
CHANGED
|
@@ -69,11 +69,12 @@ class APLRRegressor:
|
|
|
69
69
|
monotonic_constraints_ignore_interactions: bool = False,
|
|
70
70
|
group_mse_by_prediction_bins: int = 10,
|
|
71
71
|
group_mse_cycle_min_obs_in_bin: int = 30,
|
|
72
|
-
early_stopping_rounds: int =
|
|
72
|
+
early_stopping_rounds: int = 200,
|
|
73
73
|
num_first_steps_with_linear_effects_only: int = 0,
|
|
74
74
|
penalty_for_non_linearity: float = 0.0,
|
|
75
75
|
penalty_for_interactions: float = 0.0,
|
|
76
76
|
max_terms: int = 0,
|
|
77
|
+
ridge_penalty: float = 0.0001,
|
|
77
78
|
):
|
|
78
79
|
self.m = m
|
|
79
80
|
self.v = v
|
|
@@ -120,6 +121,7 @@ class APLRRegressor:
|
|
|
120
121
|
self.penalty_for_non_linearity = penalty_for_non_linearity
|
|
121
122
|
self.penalty_for_interactions = penalty_for_interactions
|
|
122
123
|
self.max_terms = max_terms
|
|
124
|
+
self.ridge_penalty = ridge_penalty
|
|
123
125
|
|
|
124
126
|
# Creating aplr_cpp and setting parameters
|
|
125
127
|
self.APLRRegressor = aplr_cpp.APLRRegressor()
|
|
@@ -180,6 +182,7 @@ class APLRRegressor:
|
|
|
180
182
|
self.APLRRegressor.penalty_for_non_linearity = self.penalty_for_non_linearity
|
|
181
183
|
self.APLRRegressor.penalty_for_interactions = self.penalty_for_interactions
|
|
182
184
|
self.APLRRegressor.max_terms = self.max_terms
|
|
185
|
+
self.APLRRegressor.ridge_penalty = self.ridge_penalty
|
|
183
186
|
|
|
184
187
|
def fit(
|
|
185
188
|
self,
|
|
@@ -196,6 +199,7 @@ class APLRRegressor:
|
|
|
196
199
|
predictor_learning_rates: List[float] = [],
|
|
197
200
|
predictor_penalties_for_non_linearity: List[float] = [],
|
|
198
201
|
predictor_penalties_for_interactions: List[float] = [],
|
|
202
|
+
predictor_min_observations_in_split: List[int] = [],
|
|
199
203
|
):
|
|
200
204
|
self.__set_params_cpp()
|
|
201
205
|
self.APLRRegressor.fit(
|
|
@@ -212,6 +216,7 @@ class APLRRegressor:
|
|
|
212
216
|
predictor_learning_rates,
|
|
213
217
|
predictor_penalties_for_non_linearity,
|
|
214
218
|
predictor_penalties_for_interactions,
|
|
219
|
+
predictor_min_observations_in_split,
|
|
215
220
|
)
|
|
216
221
|
|
|
217
222
|
def predict(
|
|
@@ -341,6 +346,7 @@ class APLRRegressor:
|
|
|
341
346
|
"penalty_for_non_linearity": self.penalty_for_non_linearity,
|
|
342
347
|
"penalty_for_interactions": self.penalty_for_interactions,
|
|
343
348
|
"max_terms": self.max_terms,
|
|
349
|
+
"ridge_penalty": self.ridge_penalty,
|
|
344
350
|
}
|
|
345
351
|
|
|
346
352
|
# For sklearn
|
|
@@ -368,11 +374,12 @@ class APLRClassifier:
|
|
|
368
374
|
max_eligible_terms: int = 7,
|
|
369
375
|
boosting_steps_before_interactions_are_allowed: int = 0,
|
|
370
376
|
monotonic_constraints_ignore_interactions: bool = False,
|
|
371
|
-
early_stopping_rounds: int =
|
|
377
|
+
early_stopping_rounds: int = 200,
|
|
372
378
|
num_first_steps_with_linear_effects_only: int = 0,
|
|
373
379
|
penalty_for_non_linearity: float = 0.0,
|
|
374
380
|
penalty_for_interactions: float = 0.0,
|
|
375
381
|
max_terms: int = 0,
|
|
382
|
+
ridge_penalty: float = 0.0001,
|
|
376
383
|
):
|
|
377
384
|
self.m = m
|
|
378
385
|
self.v = v
|
|
@@ -399,6 +406,7 @@ class APLRClassifier:
|
|
|
399
406
|
self.penalty_for_non_linearity = penalty_for_non_linearity
|
|
400
407
|
self.penalty_for_interactions = penalty_for_interactions
|
|
401
408
|
self.max_terms = max_terms
|
|
409
|
+
self.ridge_penalty = ridge_penalty
|
|
402
410
|
|
|
403
411
|
# Creating aplr_cpp and setting parameters
|
|
404
412
|
self.APLRClassifier = aplr_cpp.APLRClassifier()
|
|
@@ -433,6 +441,7 @@ class APLRClassifier:
|
|
|
433
441
|
self.APLRClassifier.penalty_for_non_linearity = self.penalty_for_non_linearity
|
|
434
442
|
self.APLRClassifier.penalty_for_interactions = self.penalty_for_interactions
|
|
435
443
|
self.APLRClassifier.max_terms = self.max_terms
|
|
444
|
+
self.APLRClassifier.ridge_penalty = self.ridge_penalty
|
|
436
445
|
|
|
437
446
|
def fit(
|
|
438
447
|
self,
|
|
@@ -447,6 +456,7 @@ class APLRClassifier:
|
|
|
447
456
|
predictor_learning_rates: List[float] = [],
|
|
448
457
|
predictor_penalties_for_non_linearity: List[float] = [],
|
|
449
458
|
predictor_penalties_for_interactions: List[float] = [],
|
|
459
|
+
predictor_min_observations_in_split: List[int] = [],
|
|
450
460
|
):
|
|
451
461
|
self.__set_params_cpp()
|
|
452
462
|
self.APLRClassifier.fit(
|
|
@@ -461,6 +471,7 @@ class APLRClassifier:
|
|
|
461
471
|
predictor_learning_rates,
|
|
462
472
|
predictor_penalties_for_non_linearity,
|
|
463
473
|
predictor_penalties_for_interactions,
|
|
474
|
+
predictor_min_observations_in_split,
|
|
464
475
|
)
|
|
465
476
|
# For sklearn
|
|
466
477
|
self.classes_ = np.arange(len(self.APLRClassifier.get_categories()))
|
|
@@ -523,6 +534,7 @@ class APLRClassifier:
|
|
|
523
534
|
"penalty_for_non_linearity": self.penalty_for_non_linearity,
|
|
524
535
|
"penalty_for_interactions": self.penalty_for_interactions,
|
|
525
536
|
"max_terms": self.max_terms,
|
|
537
|
+
"ridge_penalty": self.ridge_penalty,
|
|
526
538
|
}
|
|
527
539
|
|
|
528
540
|
# For sklearn
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: aplr
|
|
3
|
-
Version: 10.
|
|
3
|
+
Version: 10.9.0
|
|
4
4
|
Summary: Automatic Piecewise Linear Regression
|
|
5
5
|
Home-page: https://github.com/ottenbreit-data-science/aplr
|
|
6
6
|
Author: Mathias von Ottenbreit
|
|
@@ -13,7 +13,19 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
13
13
|
Requires-Python: >=3.8
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
|
16
|
-
Requires-Dist: numpy
|
|
16
|
+
Requires-Dist: numpy>=1.11
|
|
17
|
+
Dynamic: author
|
|
18
|
+
Dynamic: author-email
|
|
19
|
+
Dynamic: classifier
|
|
20
|
+
Dynamic: description
|
|
21
|
+
Dynamic: description-content-type
|
|
22
|
+
Dynamic: home-page
|
|
23
|
+
Dynamic: license
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
Dynamic: platform
|
|
26
|
+
Dynamic: requires-dist
|
|
27
|
+
Dynamic: requires-python
|
|
28
|
+
Dynamic: summary
|
|
17
29
|
|
|
18
30
|
# APLR
|
|
19
31
|
**Automatic Piecewise Linear Regression**
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
aplr_cpp.cpython-312-darwin.so,sha256=M0biCks2gbLyDvUmFaI3LvN66GAif5G-9plnNe7zfwo,1165376
|
|
2
|
+
aplr-10.9.0.dist-info/RECORD,,
|
|
3
|
+
aplr-10.9.0.dist-info/WHEEL,sha256=zT4bWmTpgvLb-CO5IGKhtulo8JdnX1gd0cgiqom_p-o,109
|
|
4
|
+
aplr-10.9.0.dist-info/top_level.txt,sha256=DXVC0RIFGpzVnPeKWAZTXQdJheOEZL51Wip6Fx7zbR4,14
|
|
5
|
+
aplr-10.9.0.dist-info/METADATA,sha256=YyVcDnXStzsAnm5KWfxaSYgd70qn6IqhqaoLpZI-3IM,2361
|
|
6
|
+
aplr-10.9.0.dist-info/licenses/LICENSE,sha256=g4qcQtkSVPHtGRi3T93DoFCrssvW6ij_emU-2fj_xfY,1113
|
|
7
|
+
aplr/__init__.py,sha256=rRfTgNWnYZlFatyA920lWqBcjwmQUI7FcvEPFUTJgzE,20
|
|
8
|
+
aplr/aplr.py,sha256=18XnQy37U3AApCWESlfKysuHPsl9_LiF2kyubroFr_Q,26718
|
aplr_cpp.cpython-312-darwin.so
CHANGED
|
Binary file
|
aplr-10.7.4.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
aplr_cpp.cpython-312-darwin.so,sha256=hkR2aUD1FH4m36XzLAWSfEKbhPtNMSNdBigoQWF5WjE,1158656
|
|
2
|
-
aplr-10.7.4.dist-info/RECORD,,
|
|
3
|
-
aplr-10.7.4.dist-info/LICENSE,sha256=g4qcQtkSVPHtGRi3T93DoFCrssvW6ij_emU-2fj_xfY,1113
|
|
4
|
-
aplr-10.7.4.dist-info/WHEEL,sha256=dDtzwOWThQIVqSeRYqgCmKif7EXMdMp6sRsrNsuarPE,110
|
|
5
|
-
aplr-10.7.4.dist-info/top_level.txt,sha256=DXVC0RIFGpzVnPeKWAZTXQdJheOEZL51Wip6Fx7zbR4,14
|
|
6
|
-
aplr-10.7.4.dist-info/METADATA,sha256=CMOX83KWET2AQ1-VW0TTfXRpCA7NTt_eZIMSvn7GTME,2110
|
|
7
|
-
aplr/__init__.py,sha256=rRfTgNWnYZlFatyA920lWqBcjwmQUI7FcvEPFUTJgzE,20
|
|
8
|
-
aplr/aplr.py,sha256=4a_5jtaeA5rYc1-6K1fhE8wmWCzVnR_SZ4YdbqBoX_M,26099
|
|
File without changes
|
|
File without changes
|