#NEWLINE# def test_predictions( self ) : #NEWLINE# #INDENT# data = [ [ 'TGGAGGCTGCTTTACCCGCTGTGGGGGCGC' , 254 , 87 , 0.5335 , 0.5909 ] , [ 'CGTCTCCGGGTTGGCCTTCCACTGGGGCAG' , 216 , 74 , 0.6783 , 0.6632 ] , [ 'CCCTCAGCATCCTTCGGAAAGCTCTGGACA' , 80 , 27 , 0.4898 , 0.4461 ] ] #NEWLINE# for d in data : #NEWLINE# #INDENT# prediction_full = azimuth . model_comparison . predict ( np . array ( [ d [ 0 ] ] ) , np . array ( [ d [ 1 ] ] ) , np . array ( [ d [ 2 ] ] ) ) [ 0 ] #NEWLINE# prediction_nopos = azimuth . model_comparison . predict ( np . array ( [ d [ 0 ] ] ) , None , None ) [ 0 ] #NEWLINE# message = '\n\n\n' #NEWLINE# message += "WARNING!!! The predictions don't match\n" #NEWLINE# message += ( 'Full model prediction: %.4f  \t  Correct prediction: %.4f\n' % ( d [ 3 ] , prediction_full ) ) #NEWLINE# message += ( 'No-pos model prediction: %.4f  \t  Correct prediction: %.4f\n' % ( d [ 4 ] , prediction_nopos ) ) #NEWLINE# self . assertTrue ( np . allclose ( [ prediction_full , prediction_nopos ] , [ d [ 3 ] , d [ 4 ] ] , atol = 0.001 ) , msg = message )