Skip to content

Commit 7093ace

Browse files
authored
Merge pull request #99 from stratakis/scikit-learn-1.8.0
Fix compatibility with scikit-learn 1.8+
2 parents 1176642 + 6cd54f2 commit 7093ace

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,7 @@ In the modifier version of NiaAML optimization process there are two types of op
172172

173173
```python
174174
self._params = dict(
175-
n_estimators = ParameterDefinition(MinMax(min=10, max=111), np.uint),
176-
algorithm = ParameterDefinition(['SAMME', 'SAMME.R'])
175+
n_estimators = ParameterDefinition(MinMax(min=10, max=111), np.uint)
177176
)
178177
```
179178

docs/getting_started.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ In NiaAML there are two types of optimization. Goal of the first type is to find
181181
.. code:: python
182182
183183
self._params = dict(
184-
n_estimators = ParameterDefinition(MinMax(min=10, max=111), np.uint),
185-
algorithm = ParameterDefinition(['SAMME', 'SAMME.R'])
184+
n_estimators = ParameterDefinition(MinMax(min=10, max=111), np.uint)
186185
)
187186
188187
An individual in the second type of optimization is a real-valued vector that has a size equal to the sum of number of keys in all three dictionaries (classifier's _params, feature transformation algorithm's _params and feature selection algorithm's _params) and a value of each dimension is in range [0.0, 1.0]. The second type of optimization maps real values from the individual's vector to those parameter definitions in the dictionaries. Each parameter's value can be defined as a range or array of values. In the first case, a value from vector is mapped from one iterval to another and in the second case, a value from vector falls into one of the bins that represent an index of the array that holds possible parameter's values.

examples/classifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
classifier = AdaBoost()
2020

2121
# set parameters of the classifier
22-
classifier.set_parameters(n_estimators=50, algorithm="SAMME")
22+
classifier.set_parameters(n_estimators=50)
2323

2424
# fit classifier to the data
2525
classifier.fit(data_reader.get_x(), data_reader.get_y())

niaaml/classifiers/ada_boost.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ def __init__(self, **kwargs):
5151

5252
self._params = dict(
5353
n_estimators=ParameterDefinition(MinMax(min=10, max=111), np.uint),
54-
algorithm=ParameterDefinition(["SAMME"]),
5554
)
56-
self.__ada_boost = AdaBoostClassifier(algorithm='SAMME')
55+
self.__ada_boost = AdaBoostClassifier()
5756

5857
def set_parameters(self, **kwargs):
5958
r"""Set the parameters/arguments of the algorithm."""

0 commit comments

Comments
 (0)