def test_probabilities(self): est = sk.Probabilities(DummyProbEstimator(2)) preds, x, y = shortcuts.predict( store=store.MemoryStore(), data=self.data, model=est, predict_index=self.data.index, target='y', metrics=[metrics.AUC()], features=['a']) self.assertEqual(preds.shape, (10, 2))
def test_binary_probabilities(self): est = sk.BinaryProbabilities(DummyProbEstimator(2)) preds, x, y = shortcuts.predict( store=store.MemoryStore(), data=self.data, model=est, predict_index=self.data.index, target='y', metrics=[metrics.AUC()], features=['a']) self.assertEqual(len(preds), 10) t = np.zeros(10) t[0] = 1 metrics.AUC().score(t, preds)