Random Shuffle of Dataset
Data Preparation & Feature Engineering DS practice problem on Onlearn.
Difficulty: easy.
Topics: Understanding Random Shuffle of Dataset, Permutation Indices, Pseudo-random Seed, In-place Modification, Vectorized Indexing, Deterministic State, Data Preprocessing, Statistical Sampling, Numerical Computing, Software Engineering, Machine Learning Pipelines, Data Shuffling, Random Number Generation, Array Manipulation, Reproducibility Management, Data Alignment.
Write a Python function to perform a random shuffle of the samples in two numpy arrays, X and y, while maintaining the corresponding order between them. The function should have an optional seed parameter for reproducibility.