Skip to content

Commit 819bb4f

Browse files
author
Thierry RAMORASOAVINA
committed
Make the default value of n_features match the khiops core value
- KhiopsClassifier, KhiopsRegressor, KhiopsEncoder
1 parent 26eff62 commit 819bb4f

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
- Example: 10.2.1.4 is the 5th version that supports khiops 10.2.1.
77
- Internals: Changes in *Internals* sections are unlikely to be of interest for data scientists.
88

9+
## Unreleased
10+
11+
# Fixed
12+
- (`sklearn`) Default value of `n_features` for the supervised estimators
13+
914
## 11.0.0.2 - 2026-01-26
1015

1116
## Fixed

khiops/sklearn/estimators.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ class KhiopsSupervisedEstimator(KhiopsEstimator):
11881188

11891189
def __init__(
11901190
self,
1191-
n_features=100,
1191+
n_features=1000,
11921192
n_trees=10,
11931193
n_text_features=10000,
11941194
type_text_features="words",
@@ -1504,7 +1504,7 @@ class KhiopsPredictor(KhiopsSupervisedEstimator):
15041504

15051505
def __init__(
15061506
self,
1507-
n_features=100,
1507+
n_features=1000,
15081508
n_trees=10,
15091509
n_text_features=10000,
15101510
type_text_features="words",
@@ -1645,7 +1645,7 @@ class KhiopsClassifier(ClassifierMixin, KhiopsPredictor):
16451645
16461646
Parameters
16471647
----------
1648-
n_features : int, default 100
1648+
n_features : int, default 1000
16491649
Maximum number of features to construct automatically. See
16501650
:doc:`/multi_table_primer` for more details on the multi-table-specific
16511651
features.
@@ -1734,7 +1734,7 @@ class KhiopsClassifier(ClassifierMixin, KhiopsPredictor):
17341734

17351735
def __init__(
17361736
self,
1737-
n_features=100,
1737+
n_features=1000,
17381738
n_pairs=0,
17391739
n_trees=10,
17401740
n_text_features=10000,
@@ -2060,7 +2060,7 @@ class KhiopsRegressor(RegressorMixin, KhiopsPredictor):
20602060
20612061
Parameters
20622062
----------
2063-
n_features : int, default 100
2063+
n_features : int, default 1000
20642064
Maximum number of features to construct automatically. See
20652065
:doc:`/multi_table_primer` for more details on the multi-table-specific
20662066
features.
@@ -2122,7 +2122,7 @@ class KhiopsRegressor(RegressorMixin, KhiopsPredictor):
21222122

21232123
def __init__(
21242124
self,
2125-
n_features=100,
2125+
n_features=1000,
21262126
n_trees=0,
21272127
n_text_features=10000,
21282128
type_text_features="words",
@@ -2262,7 +2262,7 @@ class KhiopsEncoder(TransformerMixin, KhiopsSupervisedEstimator):
22622262
----------
22632263
categorical_target : bool, default ``True``
22642264
``True`` if the target column is categorical.
2265-
n_features : int, default 100
2265+
n_features : int, default 1000
22662266
Maximum number of features to construct automatically. See
22672267
:doc:`/multi_table_primer` for more details on the multi-table-specific
22682268
features.
@@ -2366,7 +2366,7 @@ class KhiopsEncoder(TransformerMixin, KhiopsSupervisedEstimator):
23662366
def __init__(
23672367
self,
23682368
categorical_target=True,
2369-
n_features=100,
2369+
n_features=1000,
23702370
n_pairs=0,
23712371
n_trees=0,
23722372
n_text_features=10000,

tests/test_sklearn.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,7 @@ def setUpClass(cls):
753753
"field_separator": "\t",
754754
"detect_format": False,
755755
"header_line": True,
756+
"max_constructed_variables": 1000,
756757
"max_pairs": 1,
757758
"max_trees": 5,
758759
"max_text_features": 300000,
@@ -784,6 +785,7 @@ def setUpClass(cls):
784785
"field_separator": "\t",
785786
"detect_format": False,
786787
"header_line": True,
788+
"max_constructed_variables": 1000,
787789
"max_trees": 0,
788790
"max_text_features": 300000,
789791
"text_features": "ngrams",
@@ -811,6 +813,7 @@ def setUpClass(cls):
811813
"field_separator": "\t",
812814
"detect_format": False,
813815
"header_line": True,
816+
"max_constructed_variables": 1000,
814817
"max_pairs": 1,
815818
"max_trees": 5,
816819
"max_text_features": 300000,

0 commit comments

Comments
 (0)