I was wondering if there is a certain "order" of some sort in which MongoDB documents are returned when querying like this:
collection.find()
Is it always the same, given that collection does not change? Does MongoDB have some kind of order? There is an empty query, so it will just retrieve any document. I'm asking because this is for classification. I want to retrieve a bunch of documents to train a model on. The test set cannot include documents from that same set, so I do this:
trainset = collection.find().limit(train_set_size)
testset = collection.find().skip(train_set_size).limit(test_set_size)
So both sets will have absolutely no overlap.
Any thoughts?
Thanks!