我有一个不平衡的数据集,我想降低它的样本。
这是数据集:
testframe = pd.DataFrame()
testframe['id_unique'] = [0,0,0,1,1,1,2,2,2,3,3,3]
testframe['t'] = [1,2,3,1,2,3,1,2,3,1,2,3]
testframe['value'] = [10,11,12,21,22,23,31,32,33,41,42,43]
testframe['class'] = [1,1,1,2,2,2,1,1,1,1,1,1]
其中,id_unique