Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thieu1995 committed Oct 9, 2024
1 parent 32f0c24 commit 43c8e78
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/test_ElmClassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_ElmClassifier_class():
X = np.random.rand(100, 6)
y = np.random.randint(0, 2, size=100)

model = ElmClassifier(hidden_size=10, act_name="elu", seed=42)
model = ElmClassifier(layer_sizes=(10, ), act_name="elu", seed=42)
model.fit(X, y)
pred = model.predict(X)
assert ElmClassifier.SUPPORTED_CLS_METRICS == model.SUPPORTED_CLS_METRICS
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ElmRegressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_ElmRegressor_class():
noise = np.random.normal(loc=0.0, scale=0.1, size=(100, 5))
y = 2 * X + 1 + noise

model = ElmRegressor(hidden_size=10, act_name="elu", seed=42)
model = ElmRegressor(layer_sizes=(10, ), act_name="elu", seed=42)
model.fit(X, y)

pred = model.predict(X)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_MhaElmClassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def test_MhaElmClassifier_class():
y = np.random.randint(0, 2, size=100)

opt_paras = {"name": "GA", "epoch": 10, "pop_size": 30}
model = MhaElmClassifier(hidden_size=10, act_name="elu", obj_name="AS", optimizer="BaseGA",
optimizer_paras=opt_paras, verbose=False, seed=42)
model = MhaElmClassifier(layer_sizes=(10, ), act_name="elu", obj_name="AS", optim="BaseGA",
optim_paras=opt_paras, verbose=False, seed=42)
model.fit(X, y)
pred = model.predict(X)
assert MhaElmClassifier.SUPPORTED_CLS_OBJECTIVES == model.SUPPORTED_CLS_OBJECTIVES
Expand Down
4 changes: 2 additions & 2 deletions tests/test_MhaElmRegressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def test_MhaElmRegressor_class():
y = 2 * X + 1 + noise

opt_paras = {"name": "GA", "epoch": 10, "pop_size": 30}
model = MhaElmRegressor(hidden_size=10, act_name="elu", obj_name="RMSE", optimizer="BaseGA",
optimizer_paras=opt_paras, verbose=False, seed=42)
model = MhaElmRegressor(layer_sizes=(10, ), act_name="elu", obj_name="RMSE", optim="BaseGA",
optim_paras=opt_paras, verbose=False, seed=42)
model.fit(X, y)

pred = model.predict(X)
Expand Down

0 comments on commit 43c8e78

Please sign in to comment.