Category "sample"

How to get the remaining sample after using random.sample() in Python?

I have a large list of elements (in this example I'll assume it's filled with numbers). For example: l = [1,2,3,4,5,6,7,8,9,10] Now I want to take 2 samples fr

Stratified sampling in python

I would like to sample a dataframe base in python. This sample has to be stratified by specific variables. I tried sklearn.cross_validation but the problem is t