#NEWLINE# def shuffled_indices( n_samples , shuffle_factor , random_state = None ) : #NEWLINE# #INDENT# random_state = check_random_state ( random_state ) #NEWLINE# order = ( numpy . arange ( n_samples ) + random_state . normal ( 0 , ( shuffle_factor * n_samples ) , size = n_samples ) ) #NEWLINE# quantiles = ( numpy . argsort ( order ) + random_state . normal ( 0 , 1 , size = n_samples ) ) #NEWLINE# return numpy . clip ( ( order / ( n_samples - 1.0 ) ) , 0 , 1 )