#NEWLINE# def _mse( a , b ) : #NEWLINE# #INDENT# assert ( len ( a ) == len ( b ) ) #NEWLINE# ss = 0.0 #NEWLINE# for i in range ( len ( a ) ) : #NEWLINE# #INDENT# d = ( float ( a [ i ] ) - float ( b [ i ] ) ) #NEWLINE# ss += ( d * d ) #NEWLINE# #UNINDENT# return ( ss / len ( a ) )