Skip to content

Commit

Permalink
Merge pull request #81 from lahovniktadej/master
Browse files Browse the repository at this point in the history
Warnings
  • Loading branch information
firefly-cpp authored Feb 16, 2024
2 parents a4c023a + 5736740 commit 588390e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions niaaml/classifiers/ada_boost.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def __init__(self, **kwargs):

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

def set_parameters(self, **kwargs):
r"""Set the parameters/arguments of the algorithm."""
Expand Down
2 changes: 1 addition & 1 deletion niaaml/classifiers/linear_svc.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, **kwargs):
penalty=ParameterDefinition(["l1", "l2"]),
max_iter=ParameterDefinition(MinMax(min=300, max=2000), np.uint),
)
self.__linear_SVC = LSVC()
self.__linear_SVC = LSVC(dual=True)

def set_parameters(self, **kwargs):
r"""Set the parameters/arguments of the algorithm."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ class QuantileTransformer(FeatureTransformAlgorithm):
"""
Name = "Quantile Transformer"

def __init__(self, **kwargs):
def __init__(self, n_quantiles=1000, **kwargs):
r"""Initialize QuantileTransformer."""
self._params = dict(
output_distribution=ParameterDefinition(["uniform", "normal"])
)
self.__quantile_transformer = QT()
self.__quantile_transformer = QT(n_quantiles=n_quantiles)

def fit(self, x, **kwargs):
r"""Fit implemented transformation algorithm.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_feature_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_norm_works_fine(self):
self.assertEqual(transformed.shape, self.__data.get_x().shape)

def test_qt_works_fine(self):
algo = ft.QuantileTransformer()
algo = ft.QuantileTransformer(n_quantiles=25)
algo.fit(self.__data.get_x())
transformed = algo.transform(self.__data.get_x())
self.assertEqual(transformed.shape, self.__data.get_x().shape)
Expand Down

0 comments on commit 588390e

Please sign in to comment.