def test_isotonic_regression_ties_secondary_():
 x = [8, 8, 8, 10, 10, 10, 12, 12, 12, 14, 14]
 y = [21, 23.5, 23, 24, 21, 25, 21.5, 22, 19, 23.5, 25]
 y_true = [22.22222, 22.22222, 22.22222, 22.22222, 22.22222, 22.22222, 22.22222, 22.22222, 22.22222, 24.25, 24.25]
 ir = IsotonicRegression()
 ir.fit(x, y)
 assert_array_almost_equal(ir.transform(x), y_true, 4)
 assert_array_almost_equal(ir.fit_transform(x, y), y_true, 4)

def test_isotonic_regression_ties_secondary_ ( ) : x = [ 8 , 8 , 8 , 10 , 10 , 10 , 12 , 12 , 12 , 14 , 14 ] y = [ 21 , 23.5 , 23 , 24 , 21 , 25 , 21.5 , 22 , 19 , 23.5 , 25 ] y_true = [ 22.22222 , 22.22222 , 22.22222 , 22.22222 , 22.22222 , 22.22222 , 22.22222 , 22.22222 , 22.22222 , 24.25 , 24.25 ] ir = IsotonicRegression ( ) ir . fit ( x , y ) assert_array_almost_equal ( ir . transform ( x ) , y_true , 4 ) assert_array_almost_equal ( ir . fit_transform ( x , y ) , y_true , 4 )
test isotonic regression fit .