def test_make_imbalance_4():
 (X_, y_) = make_imbalance(X, Y, ratio=0.01, min_c_=1)
 counter = Counter(y_)
 assert_equal(counter[0], 500)
 assert_equal(counter[1], 5)
 assert_true(np.all([(X_i in X) for X_i in X_]))

def test_make_imbalance_4 ( ) : ( X_ , y_ ) = make_imbalance ( X , Y , ratio = 0.01 , min_c_ = 1 ) counter = Counter ( y_ ) assert_equal ( counter [ 0 ] , 500 ) assert_equal ( counter [ 1 ] , 5 ) assert_true ( np . all ( [ ( X_i in X ) for X_i in X_ ] ) )
test make_imbalance .