From 233433d99aa8936e5e7d60534a6ed727e0fadde8 Mon Sep 17 00:00:00 2001 From: Popescu V <136721202+popescu-v@users.noreply.github.com> Date: Tue, 27 Jan 2026 16:28:06 +0100 Subject: [PATCH 1/2] Document missing attributes on KhiopsRegressor Namely, n_trees, n_text_features and type_text_features. --- khiops/sklearn/estimators.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/khiops/sklearn/estimators.py b/khiops/sklearn/estimators.py index 426531fb..e941f814 100644 --- a/khiops/sklearn/estimators.py +++ b/khiops/sklearn/estimators.py @@ -2064,6 +2064,18 @@ class KhiopsRegressor(RegressorMixin, KhiopsPredictor): Maximum number of features to construct automatically. See :doc:`/multi_table_primer` for more details on the multi-table-specific features. + n_trees : int, default 10 + Maximum number of decision tree features to construct. The constructed trees + combine other features, either native or constructed. These features usually + improve the regressor's performance at the cost of interpretability of the + model. + n_text_features : int, default 10000 + Maximum number of text features to construct. + type_text_features : str, default "words" + Type of the text features to construct. Can be either one of: + - "words": sequences of non-space characters + - "ngrams": sequences of bytes + - "tokens": user-defined n_selected_features : int, default 0 Maximum number of features to be selected in the SNB predictor. If equal to 0 it selects all the features kept in the training. From 851d5049a33d01f3e0d4e8d606617cd8701621bd Mon Sep 17 00:00:00 2001 From: Popescu V <136721202+popescu-v@users.noreply.github.com> Date: Tue, 27 Jan 2026 16:37:09 +0100 Subject: [PATCH 2/2] Drop spurious warning that trees are not supported for regression KhiopsRegressor fully supports the `n_trees` attribute. --- khiops/sklearn/estimators.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/khiops/sklearn/estimators.py b/khiops/sklearn/estimators.py index e941f814..3ad6776b 100644 --- a/khiops/sklearn/estimators.py +++ b/khiops/sklearn/estimators.py @@ -2172,8 +2172,6 @@ def fit(self, X, y=None, **kwargs): self : `KhiopsRegressor` The calling estimator instance. """ - if self.n_trees > 0: - warnings.warn("Khiops does not support n_trees > 0 for regression models.") kwargs["categorical_target"] = False return super().fit(X, y=y, **kwargs)