Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ In the modifier version of NiaAML optimization process there are two types of op

```python
self._params = dict(
n_estimators = ParameterDefinition(MinMax(min=10, max=111), np.uint),
algorithm = ParameterDefinition(['SAMME', 'SAMME.R'])
n_estimators = ParameterDefinition(MinMax(min=10, max=111), np.uint)
)
```

Expand Down
3 changes: 1 addition & 2 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ In NiaAML there are two types of optimization. Goal of the first type is to find
.. code:: python

self._params = dict(
n_estimators = ParameterDefinition(MinMax(min=10, max=111), np.uint),
algorithm = ParameterDefinition(['SAMME', 'SAMME.R'])
n_estimators = ParameterDefinition(MinMax(min=10, max=111), np.uint)
)

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.
Expand Down
2 changes: 1 addition & 1 deletion examples/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
classifier = AdaBoost()

# set parameters of the classifier
classifier.set_parameters(n_estimators=50, algorithm="SAMME")
classifier.set_parameters(n_estimators=50)

# fit classifier to the data
classifier.fit(data_reader.get_x(), data_reader.get_y())
Expand Down
3 changes: 1 addition & 2 deletions niaaml/classifiers/ada_boost.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ def __init__(self, **kwargs):

self._params = dict(
n_estimators=ParameterDefinition(MinMax(min=10, max=111), np.uint),
algorithm=ParameterDefinition(["SAMME"]),
)
self.__ada_boost = AdaBoostClassifier(algorithm='SAMME')
self.__ada_boost = AdaBoostClassifier()

def set_parameters(self, **kwargs):
r"""Set the parameters/arguments of the algorithm."""
Expand Down
Loading