#NEWLINE# def test_sofm_euclide_norm_distance( self ) : #NEWLINE# #INDENT# weight = np . array ( [ [ 1.41700099 , 0.52680476 ] , [ ( - 0.60938464 ) , 1.56545643 ] , [ ( - 0.30243644 ) , 0.13994967 ] , [ ( - 0.07456091 ) , 0.54797268 ] , [ ( - 1.12894803 ) , 0.32702141 ] , [ 0.9208469 , 0.02683249 ] ] ) . T #NEWLINE# sn = algorithms . SOFM ( n_inputs = 2 , n_outputs = 6 , weight = self , transform = 'euclid' , learning_radius = 1 , features_grid = ( 3 , 2 ) , verbose = False ) #NEWLINE# sn . train ( input_data , epochs = 10 ) #NEWLINE# answers = np . array ( [ [ 0.0 , 0.0 , 0.0 , 1.0 , 0.0 , 0.0 ] , [ 0.0 , 0.0 , 0.0 , 1.0 , 0.0 , 0.0 ] , [ 1.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ] , [ 1.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ] , [ 0.0 , 0.0 , 0.0 , 0.0 , 1.0 , 0.0 ] , [ 0.0 , 0.0 , 0.0 , 0.0 , 1.0 , 0.0 ] ] ) #NEWLINE# np . testing . assert_array_almost_equal ( sn . predict ( input_data ) , answers )