#NEWLINE# def test_transform( ) : #NEWLINE# #INDENT# n_samples = 200 #NEWLINE# n_components = 10 #NEWLINE# noise_scale = 0.01 #NEWLINE# ( X , y ) = datasets . samples_generator . make_s_curve ( n_samples , random_state = 0 ) #NEWLINE# iso = manifold . Isomap ( n_components , 2 ) #NEWLINE# X_iso = iso . fit_transform ( X ) #NEWLINE# rng = np . random . RandomState ( 0 ) #NEWLINE# noise = ( noise_scale * rng . randn ( * X . shape ) ) #NEWLINE# X_iso2 = iso . transform ( ( X + noise ) ) #NEWLINE# assert_less ( np . sqrt ( np . mean ( ( ( X_iso - X_iso2 ) ** 2 ) ) ) , ( 2 * noise_scale ) )