binboost 0.2.3__tar.gz → 0.2.4__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.
- {binboost-0.2.3 → binboost-0.2.4}/PKG-INFO +1 -1
- {binboost-0.2.3 → binboost-0.2.4}/binboost/__init__.py +2 -2
- {binboost-0.2.3 → binboost-0.2.4}/binboost/binarizer.py +0 -1
- {binboost-0.2.3 → binboost-0.2.4}/binboost/binboost.py +6 -5
- {binboost-0.2.3 → binboost-0.2.4}/binboost/multiclass.py +0 -6
- {binboost-0.2.3 → binboost-0.2.4}/binboost.egg-info/PKG-INFO +1 -1
- {binboost-0.2.3 → binboost-0.2.4}/pyproject.toml +1 -1
- {binboost-0.2.3 → binboost-0.2.4}/setup.py +1 -1
- {binboost-0.2.3 → binboost-0.2.4}/LICENSE +0 -0
- {binboost-0.2.3 → binboost-0.2.4}/README.md +0 -0
- {binboost-0.2.3 → binboost-0.2.4}/binboost/loss.py +0 -0
- {binboost-0.2.3 → binboost-0.2.4}/binboost/rule.py +0 -0
- {binboost-0.2.3 → binboost-0.2.4}/binboost.egg-info/SOURCES.txt +0 -0
- {binboost-0.2.3 → binboost-0.2.4}/binboost.egg-info/dependency_links.txt +0 -0
- {binboost-0.2.3 → binboost-0.2.4}/binboost.egg-info/requires.txt +0 -0
- {binboost-0.2.3 → binboost-0.2.4}/binboost.egg-info/top_level.txt +0 -0
- {binboost-0.2.3 → binboost-0.2.4}/setup.cfg +0 -0
|
@@ -309,6 +309,7 @@ class BinBoost:
|
|
|
309
309
|
)
|
|
310
310
|
|
|
311
311
|
numeric_cols = self._detect_numeric_cols(X)
|
|
312
|
+
self.numeric_cols_ = numeric_cols
|
|
312
313
|
self.ohe_groups_ = self._detect_ohe_groups(X)
|
|
313
314
|
|
|
314
315
|
self._binarizer = GradientBinarizer(
|
|
@@ -454,7 +455,7 @@ class BinBoost:
|
|
|
454
455
|
self._check_is_fitted()
|
|
455
456
|
X, _ = self._validate_input(X)
|
|
456
457
|
F = np.zeros(X.shape[0])
|
|
457
|
-
numeric_cols = self.
|
|
458
|
+
numeric_cols = self.numeric_cols_
|
|
458
459
|
for i, (rule, weights) in enumerate(zip(self.estimators_, self.rule_weights_)):
|
|
459
460
|
if self.binarize_strategy == 'gradient' and numeric_cols:
|
|
460
461
|
X_bin = self._binarize_untuk_iterasi(X, i, numeric_cols)
|
|
@@ -521,7 +522,7 @@ class BinBoost:
|
|
|
521
522
|
"""
|
|
522
523
|
self._check_is_fitted()
|
|
523
524
|
X, _ = self._validate_input(X)
|
|
524
|
-
numeric_cols = self.
|
|
525
|
+
numeric_cols = self.numeric_cols_
|
|
525
526
|
F = np.zeros(X.shape[0])
|
|
526
527
|
for i, (rule, weights) in enumerate(zip(self.estimators_, self.rule_weights_)):
|
|
527
528
|
if self.binarize_strategy == 'gradient' and numeric_cols:
|
|
@@ -556,7 +557,7 @@ class BinBoost:
|
|
|
556
557
|
"""
|
|
557
558
|
self._check_is_fitted()
|
|
558
559
|
X, _ = self._validate_input(X)
|
|
559
|
-
numeric_cols = self.
|
|
560
|
+
numeric_cols = self.numeric_cols_
|
|
560
561
|
results = []
|
|
561
562
|
|
|
562
563
|
for i, rule in enumerate(self.estimators_):
|
|
@@ -565,8 +566,8 @@ class BinBoost:
|
|
|
565
566
|
else:
|
|
566
567
|
dummy_grad = np.ones(X.shape[0])
|
|
567
568
|
X_bin, _ = self._binarizer.transform(X, dummy_grad, numeric_cols)
|
|
568
|
-
|
|
569
|
-
|
|
569
|
+
results.append(rule.evaluate(X_bin))
|
|
570
|
+
|
|
570
571
|
return np.column_stack(results)
|
|
571
572
|
|
|
572
573
|
def get_params(self, deep=True):
|
|
@@ -4,12 +4,6 @@ from .binboost import BinBoost
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class OneVsRestBinBoost:
|
|
7
|
-
"""
|
|
8
|
-
Ekstensi BinBoost untuk klasifikasi multi-kelas (>2 kelas) lewat strategi
|
|
9
|
-
One-vs-Rest, mirip pola sklearn.multiclass.OneVsRestClassifier.
|
|
10
|
-
Untuk 2 kelas, gunakan langsung BinBoost.
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
7
|
def __init__(self, mode='multiclass', **binboost_params):
|
|
14
8
|
self.mode = mode
|
|
15
9
|
self.binboost_params = binboost_params
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="binboost",
|
|
5
|
-
version="0.2.
|
|
5
|
+
version="0.2.4",
|
|
6
6
|
author="Rangga Wahyu Pratama",
|
|
7
7
|
description="Gradient Boosting Berbasis Aturan Logika Adaptif untuk Fitur Biner",
|
|
8
8
|
long_description=open("README.md", encoding="utf-8").read(),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|