Mock ActiveLearner for testing.
| 49 | |
| 50 | |
| 51 | class MockActiveLearner: |
| 52 | """ |
| 53 | Mock ActiveLearner for testing. |
| 54 | """ |
| 55 | def __init__( |
| 56 | self, predictor=None, query_strategy=None, |
| 57 | predict_proba_return=None, calculate_utility_return=None, predict_return=None, score_return=None, |
| 58 | _X_initial=None, _y_initial=None |
| 59 | ): |
| 60 | self.estimator = predictor |
| 61 | self.query_strategy = query_strategy |
| 62 | |
| 63 | self.predict_proba_return = predict_proba_return |
| 64 | self.calculate_utility_return = calculate_utility_return |
| 65 | self.predict_return = predict_return |
| 66 | self.score_return = score_return |
| 67 | |
| 68 | def fit(self, *args, **kwargs): |
| 69 | pass |
| 70 | |
| 71 | def predict(self, *args, **kwargs): |
| 72 | return self.predict_return |
| 73 | |
| 74 | def predict_proba(self, *args, **kwargs): |
| 75 | return self.predict_proba_return |
| 76 | |
| 77 | def score(self, *args, **kwargs): |
| 78 | return self.score_return |
| 79 | |
| 80 | |
| 81 | class MockCommittee: |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…