From 30be3329593c6a0f933b54ac8b2043b83637e19f Mon Sep 17 00:00:00 2001 From: Thierry Moudiki Date: Sat, 3 Aug 2024 03:00:55 +0200 Subject: [PATCH] add GradientBoosting 'estimators' Pt.2 --- unifiedbooster/gbdt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unifiedbooster/gbdt.py b/unifiedbooster/gbdt.py index 68f1033..97a9c4e 100644 --- a/unifiedbooster/gbdt.py +++ b/unifiedbooster/gbdt.py @@ -128,7 +128,7 @@ def fit(self, X, y, **kwargs): self.classes_ ) # for compatibility with sklearn if getattr(self, "model_type") == "gradientboosting": - setattr(self, "model").max_features *= X.shape[1] + self.model.max_features = int(self.model.max_features*X.shape[1]) return getattr(self, "model").fit(X, y, **kwargs) def predict(self, X):