#NEWLINE# def regularize( X , method = 'scale' ) : #NEWLINE# #INDENT# if ( X == 'scale' ) : #NEWLINE# #INDENT# from sklearn import preprocessing #NEWLINE# return preprocessing . scale ( X , with_mean = False ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise Exception ( 'Unrecognized regularization method' )