| 1049 | ) |
| 1050 | |
| 1051 | def test_teach(self): |
| 1052 | X_training = np.random.rand(10, 2) |
| 1053 | y_training = np.random.randint(0, 2, size=10) |
| 1054 | |
| 1055 | for bootstrap, only_new in product([True, False], [True, False]): |
| 1056 | for n_samples in range(1, 10): |
| 1057 | X = np.random.rand(n_samples, 2) |
| 1058 | y = np.random.randint(0, 2, size=n_samples) |
| 1059 | |
| 1060 | learner = modAL.models.learners.ActiveLearner( |
| 1061 | X_training=X_training, y_training=y_training, |
| 1062 | estimator=mock.MockEstimator() |
| 1063 | ) |
| 1064 | |
| 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 |