#NEWLINE# def test_multioutput_regression_invariance_to_dimension_shuffling( ) : #NEWLINE# #INDENT# random_state = check_random_state ( 0 ) #NEWLINE# y_true = random_state . uniform ( 0 , 2 , size = ( 20 , 5 ) ) #NEWLINE# y_pred = random_state . uniform ( 0 , 2 , size = ( 20 , 5 ) ) #NEWLINE# for name in MULTIOUTPUT_METRICS : #NEWLINE# #INDENT# metric = ALL_METRICS [ name ] #NEWLINE# error = metric ( y_true , _ ) #NEWLINE# for _ in range ( 3 ) : #NEWLINE# #INDENT# perm = random_state . permutation ( y_true . shape [ 1 ] ) #NEWLINE# assert_almost_equal ( metric ( y_true [ : , perm ] , y_pred [ : , perm ] ) , error , err_msg = ( '%s is not dimension shuffling invariant' % name ) )