MCPcopy Create free account
hub / github.com/modAL-python/modAL / test_nan

Method test_nan

tests/core_tests.py:1067–1084  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1065 learner.teach(X, y, bootstrap=bootstrap, only_new=only_new)
1066
1067 def test_nan(self):
1068 X_training_nan = np.ones(shape=(10, 2)) * np.nan
1069 X_training_inf = np.ones(shape=(10, 2)) * np.inf
1070 y_training = np.random.randint(0, 2, size=10)
1071
1072 learner = modAL.models.learners.ActiveLearner(
1073 X_training=X_training_nan, y_training=y_training,
1074 estimator=mock.MockEstimator(),
1075 force_all_finite=False
1076 )
1077 learner.teach(X_training_nan, y_training)
1078
1079 learner = modAL.models.learners.ActiveLearner(
1080 X_training=X_training_inf, y_training=y_training,
1081 estimator=mock.MockEstimator(),
1082 force_all_finite=False
1083 )
1084 learner.teach(X_training_inf, y_training)
1085
1086 def test_keras(self):
1087 pass

Callers

nothing calls this directly

Calls 1

teachMethod · 0.95

Tested by

no test coverage detected