def test_fit_sample_half():
 ratio = 0.6
 ee = EasyEnsemble(ratio=ratio, random_state=RND_SEED, n_subsets=3)
 (X_resampled, y_resampled) = ee.fit_sample(X, Y)
 X_gt = np.array([[[0.85117925, 1.0185556], [(-0.58539673), 0.62515052], [1.35269503, 0.44812421], [0.5220963, 0.11349303], [(-2.10724436), 0.70263997], [1.10915364, 0.05718352], [0.22039505, 0.26469445], [0.59091459, 0.40692742]], [[0.85117925, 1.0185556], [(-0.58539673), 0.62515052], [(-1.23195149), 0.15427291], [(-2.10724436), 0.70263997], [0.5220963, 0.11349303], [0.22039505, 0.26469445], [1.10915364, 0.05718352], [0.59091459, 0.40692742]], [[0.85117925, 1.0185556], [(-0.58539673), 0.62515052], [(-1.23195149), 0.15427291], [0.5220963, 0.11349303], [1.35269503, 0.44812421], [1.10915364, 0.05718352], [0.59091459, 0.40692742], [0.22039505, 0.26469445]]])
 y_gt = np.array([[0, 0, 1, 1, 1, 2, 2, 2], [0, 0, 1, 1, 1, 2, 2, 2], [0, 0, 1, 1, 1, 2, 2, 2]])
 assert_array_equal(X_resampled, X_gt)
 assert_array_equal(y_resampled, y_gt)

def test_fit_sample_half ( ) : ratio = 0.6 ee = EasyEnsemble ( ratio = ratio , random_state = RND_SEED , n_subsets = 3 ) ( X_resampled , y_resampled ) = ee . fit_sample ( X , Y ) X_gt = np . array ( [ [ [ 0.85117925 , 1.0185556 ] , [ ( - 0.58539673 ) , 0.62515052 ] , [ 1.35269503 , 0.44812421 ] , [ 0.5220963 , 0.11349303 ] , [ ( - 2.10724436 ) , 0.70263997 ] , [ 1.10915364 , 0.05718352 ] , [ 0.22039505 , 0.26469445 ] , [ 0.59091459 , 0.40692742 ] ] , [ [ 0.85117925 , 1.0185556 ] , [ ( - 0.58539673 ) , 0.62515052 ] , [ ( - 1.23195149 ) , 0.15427291 ] , [ ( - 2.10724436 ) , 0.70263997 ] , [ 0.5220963 , 0.11349303 ] , [ 0.22039505 , 0.26469445 ] , [ 1.10915364 , 0.05718352 ] , [ 0.59091459 , 0.40692742 ] ] , [ [ 0.85117925 , 1.0185556 ] , [ ( - 0.58539673 ) , 0.62515052 ] , [ ( - 1.23195149 ) , 0.15427291 ] , [ 0.5220963 , 0.11349303 ] , [ 1.35269503 , 0.44812421 ] , [ 1.10915364 , 0.05718352 ] , [ 0.59091459 , 0.40692742 ] , [ 0.22039505 , 0.26469445 ] ] ] ) y_gt = np . array ( [ [ 0 , 0 , 1 , 1 , 1 , 2 , 2 , 2 ] , [ 0 , 0 , 1 , 1 , 1 , 2 , 2 , 2 ] , [ 0 , 0 , 1 , 1 , 1 , 2 , 2 , 2 ] ] ) assert_array_equal ( X_resampled , X_gt ) assert_array_equal ( y_resampled , y_gt )
test fit and sample routines with ratio of .