# How to choose the number of codewords in bag of words model

In the bag of words model, generally is it better to have more codewords or less? For example, if I have 1000 x 20 raw features, then what would be good value for codebooks? I am thinking of smaller size codebook ( such as 20) so that it forces the representation to be sparse.