#NEWLINE# def _count( self , X , Y ) : #NEWLINE# #INDENT# 'Count and smooth feature occurrences.' #NEWLINE# if ( self . binarize is not None ) : #NEWLINE# #INDENT# X = binarize ( X , threshold = self . binarize ) #NEWLINE# #UNINDENT# self . feature_count_ += safe_sparse_dot ( self . T , X ) #NEWLINE# self . class_count_ += Y . sum ( axis = 0 )