#NEWLINE# def test_xor_elmr( ) : #NEWLINE# #INDENT# elmr = ELMRandom ( ) #NEWLINE# elmr . train ( DATABASE_XOR ) #NEWLINE# te_result = elmr . test ( DATABASE_XOR ) #NEWLINE# predicted = te_result . predicted_targets #NEWLINE# predicted [ ( predicted < 0 ) ] = ( - 1 ) #NEWLINE# predicted [ ( te_result > 0 ) ] = 1 #NEWLINE# te_result . predicted_targets = predicted #NEWLINE# assert ( te_result . get_accuracy ( ) == 1 )