Skip to content

Commit

Permalink
tests added for force_all_finite mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-cortex committed Nov 11, 2019
1 parent fdd2aa7 commit 93c7804
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/core_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,25 @@ def test_teach(self):

learner.teach(X, y, bootstrap=bootstrap, only_new=only_new)

def test_nan(self):
X_training_nan = np.ones(shape=(10, 2)) * np.nan
X_training_inf = np.ones(shape=(10, 2)) * np.inf
y_training = np.random.randint(0, 2, size=10)

learner = modAL.models.learners.ActiveLearner(
X_training=X_training_nan, y_training=y_training,
estimator=mock.MockEstimator(),
force_all_finite=False
)
learner.teach(X_training_nan, y_training)

learner = modAL.models.learners.ActiveLearner(
X_training=X_training_inf, y_training=y_training,
estimator=mock.MockEstimator(),
force_all_finite=False
)
learner.teach(X_training_inf, y_training)

def test_keras(self):
pass

Expand Down

0 comments on commit 93c7804

Please sign in to comment.