return np.array([[0.1, 0.9], [0.7, 0.3]])
model = Dummy2()
task_type = BINARY_CLASSIFICATION
configuration_space = get_configuration_space(
D.info,
include_estimators=["extra_trees"],
include_preprocessors=["select_rates"])
configuration = configuration_space.sample_configuration()
evaluator = HoldoutEvaluator(D, self.output_dir, configuration)
pred = evaluator.predict_proba(None, model, task_type,
D.data["Y_train"])
expected = [[0.9], [0.3]]
for i in range(len(expected)):
self.assertEqual(expected[i], pred[i][1])
After Change
evaluator = HoldoutEvaluator(D, self.output_dir, configuration)
evaluator.model = model
loss, Y_optimization_pred, Y_valid_pred, Y_test_pred = \
evaluator.fit_predict_and_loss()
for i in range(23):