We propose the use of nonnegative matrix factorization (NMF) as a model-independent methodology to analyze neural activity. We demonstrate that, using this technique, it is possible to identify local spatiotemporal patterns of neural activity in the form of sparse basis vectors. In addition, the sparseness of these bases can help infer correlations between cortical firing patterns and behavior. We demonstrate the utility of this approach using neural recordings collected in a brain-machine interface (BMI) setting. The results indicate that, using the NMF analysis, it is possible to improve the performance of BMI models through appropriate pruning of inputs.