I was curious to know if shuffling ML training data is beneficial to better results?
Sorry not a lot of wisdom here, but I have been reading a post from pythonprogramming.net for this topic.
I copied this function from the post and modified to just save my shuffled data to csv file.
def Randomizing(): df2 = df.reindex(np.random.permutation(df.index)) df2.to_csv('C:\\Users\\Machine-Learning-Electric-Data\\randomized.csv') Randomizing()
What appears to happen is only the index gets shuffled and all other data stays the same. I have many columns in my pd dataframe where I would need to keep all rows the same. (randomly shuffle all rows, its time series data) If this is beneficial can someone give me a tip on how to randomly shuffle my data more than just the index?