The `metrics.pairwise` module has a euclidean distance that works with sparse matrices. We should have a version of cosine distance that does as well.