request for a shuffle method in SFrame

User 690 | 1/2/2015, 1:58:44 AM

Hi Everybody, I think a shuffle method is going to be usefull. Currently the way I am implementing shuffle is the following. def shuffle(data): i=5 while i>0: print 'shuffle ',i x1,x2 = data.random_split(0.5) data = x1.append(x2) i-- return data

I feel that there can be a very efficient way doing this if done internally. Thanks, Sunil.

Comments

User 940 | 1/2/2015, 6:25:02 AM

Hi Sunil!

Thank you for the suggestion, it's certainly something we will consider since it is quite useful.

One way we've been shuffling is creating a column of random numbers, and sorting by that column.

Thanks again,

Piotr


User 690 | 1/2/2015, 9:45:49 AM

I feel adding a column with random value and then sorting it will more expensive than the method I provided.. We will need to benchmark it though .. :)