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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changes:
* Add `clean` parameter to wipe existing population to `json_read` ([#202](https://github.com/xcsf-dev/xcsf/pull/202))
* Add Ruff linting and formatting for Python ([#196](https://github.com/xcsf-dev/xcsf/pull/196))
* Fix Python `json_read` crashing when the new population is empty ([#205](https://github.com/xcsf-dev/xcsf/pull/205))
* Reduce `max_trials` in Python tests for speed

## Version 1.4.7 (Aug 19, 2024)

Expand Down
10 changes: 5 additions & 5 deletions test/python/test_xcsf.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def test_deterministic_prediction(data, prediction):
y_dim=data.y_dim,
n_actions=1,
pop_size=200,
max_trials=1000,
max_trials=100,
random_state=SEED,
prediction=prediction,
)
Expand Down Expand Up @@ -329,7 +329,7 @@ def _test_pop_replace(
X = np.random.random((n, dx))
y = np.random.randn(n, 1)

xcs = xcsf.XCS(x_dim=dx, pop_size=5, max_trials=1000, pop_init=pop_init)
xcs = xcsf.XCS(x_dim=dx, pop_size=5, max_trials=100, pop_init=pop_init)
xcs.fit(X, y, verbose=False)

# Initial, “too large” population.
Expand Down Expand Up @@ -388,7 +388,7 @@ def test_pop_replace(
def test_pop_replace_empty(tmp_path):
# Init'ing the pop and overwriting it with an empty one using the clean
# option should result in an empty pop.
xcs = xcsf.XCS(pop_size=100, max_trials=1000, pop_init=True)
xcs = xcsf.XCS(pop_size=100, max_trials=100, pop_init=True)

assert xcs.pset_size() == 100

Expand All @@ -401,7 +401,7 @@ def test_pop_replace_empty(tmp_path):

# Not init'ing the pop and overwriting it with an empty one using the clean
# option should keep the pop empty.
xcs = xcsf.XCS(pop_size=100, max_trials=1000, pop_init=False)
xcs = xcsf.XCS(pop_size=100, max_trials=100, pop_init=False)

assert xcs.pset_size() == 0

Expand All @@ -414,7 +414,7 @@ def test_pop_replace_empty(tmp_path):

# Init'ing the pop and overwriting it with an empty one but without using
# the clean option should not empty the pop.
xcs = xcsf.XCS(pop_size=100, max_trials=1000, pop_init=True)
xcs = xcsf.XCS(pop_size=100, max_trials=100, pop_init=True)

assert xcs.pset_size() == 100

Expand Down
Loading