> If you treat filenames as instances, you can use `cross_validation` methods (e.g. `train_test_split`) directly.

The current iteration of documents by filename might mean adjacent data is highly correlated and therefore taking the first chunk may not representative as a test set. I would also prefer to see the holding out done by `cross_validation.train_test_split` than taking the head of the data ad-hoc. So perhaps use `train_test_split` to slice an array of data paths...