#NEWLINE# def _init( self , X ) : #NEWLINE# #INDENT# ( n_samples , n_features ) = X . shape #NEWLINE# if ( self . _init_dictionary is None ) : #NEWLINE# #INDENT# H_init = normalize_sum ( ( np . abs ( np . random . random ( ( self . n_components , n_features ) ) ) + 0.01 ) , axis = 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert ( self . _init_dictionary . shape == ( self . n_components , n_features ) ) #NEWLINE# H_init = self . _init_dictionary #NEWLINE# #UNINDENT# W_init = X . dot ( H_init . T ) #NEWLINE# return ( W_init , H_init )