def test_bad_val_in_column_descriptions():
np.random.seed(0)
df_titanic_train, df_titanic_test = utils.get_titanic_binary_classification_dataset()
column_descriptions = {
'survived': 'output'
, 'embarked': 'categorical'
, 'pclass': 'categorical'
, 'fare': 'this_is_a_bad_value'
}
with warnings.catch_warnings(record=True) as w:
ml_predictor = Predictor(type_of_estimator='classifier', column_descriptions=column_descriptions)
print('we should be throwing a warning for the user to give them useful feedback')
assert len(w) == 1
评论列表
文章目录