def test_bagged_classifier(): imputer = BaggedClassifierImputer(cols=['label'], random_state=42) trans = imputer.fit_transform(Y) assert trans is not Y assert_array_almost_equal( trans.values, np.array([[1., nan, 3.1, 1.], [nan, 2.3, nan, 2.], [2.1, 2.1, 3.1, 1.]]))
def test_bagged_classifier_continuous(): imputer = BaggedClassifierImputer() # fails on continuous data! assert_raises(ValueError, imputer.fit, X)