def test_multiclass_fit_sample():
 y = Y.copy()
 y[5] = 2
 y[6] = 2
 cc = ClusterCentroids(random_state=RND_SEED)
 (X_resampled, y_resampled) = cc.fit_sample(X, y)
 count_y_res = Counter(y_resampled)
 assert_equal(count_y_res[0], 2)
 assert_equal(count_y_res[1], 2)
 assert_equal(count_y_res[2], 2)

def test_multiclass_fit_sample ( ) : y = Y . copy ( ) y [ 5 ] = 2 y [ 6 ] = 2 cc = ClusterCentroids ( random_state = RND_SEED ) ( X_resampled , y_resampled ) = cc . fit_sample ( X , y ) count_y_res = Counter ( y_resampled ) assert_equal ( count_y_res [ 0 ] , 2 ) assert_equal ( count_y_res [ 1 ] , 2 ) assert_equal ( count_y_res [ 2 ] , 2 )
test fit sample method with multiclass target .