#NEWLINE# def decision_function( self , X ) : #NEWLINE# #INDENT# X = numpy . array ( X ) #NEWLINE# assert ( X . shape [ 1 ] == self . n_features ) #NEWLINE# result = numpy . zeros ( len ( X ) , dtype = 'float' ) #NEWLINE# for ( feature , feature_values ) in enumerate ( self . enumerate_features ( X ) ) : #NEWLINE# #INDENT# result += numpy . take ( self . coeffs [ feature , : ] , feature_values ) #NEWLINE# #UNINDENT# return result