M121 : $sample when it is useful in real world scenario?

Very difficult to understand. Also not understood, why and when will this kind of functionality will be useful.

I used it to test new algorithm. The data set has 1 million documents and the processing is quite long and testing on the whole collection would be too long. So I test the new algorithm by first selecting a $sample. And I select a new $sample each time to make sure that I do not adjust my algorithm to fit a fix sample.

Authorities could use it to perform audit on a $sample of income filings.

1 Like