Skip to content

Commit

Permalink
wip: prepare ensemble
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Maik Jablonka committed Jun 14, 2022
1 parent e0acc3b commit d26d111
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions tests/test_pal_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,28 @@ def test_pal_ensemble_init(make_random_dataset):
m1 = build_model(X, y, 1) # pylint:disable=invalid-name
m2 = build_model(X, y, 2) # pylint:disable=invalid-name

palgpy_instance = PALGPy(X, models=[m0, m1, m2], ndim=3, delta=0.01, pooling_method="fro")
palgpy_instance_2 = PALGPy(X, models=[m0, m1, m2], ndim=3, delta=0.01, pooling_method="mean")

palgpy_instance = PALGPy(
X,
models=[m0, m1, m2],
ndim=3,
delta=0.01,
pooling_method="fro",
restarts=3,
)
palgpy_instance_2 = PALGPy(
X,
models=[m0, m1, m2],
ndim=3,
delta=0.01,
pooling_method="mean",
restarts=3,
)
palgpy_instance.cross_val_points = 0
palgpy_instance_2.cross_val_points = 0
pal_ensemble = PALEnsemble([palgpy_instance, palgpy_instance_2])
pal_ensemble.update_train_set(sample_idx, y[sample_idx])
sample, _ = pal_ensemble.run_one_step(1)
assert len(sample) == 1

sample, _ = pal_ensemble.run_one_step(20)
assert len(sample) == 20

0 comments on commit d26d111

Please sign in to comment.