Implement a function random_split that randomly partitions a dataset into training, validation, and test subsets based on given fractions. The function should:
data of shape (n, d), a float train_frac, a float validation_frac, and an integer seed for reproducibility.np.random.default_rng(seed).permutation(n) to generate a random ordering of row indices.int():
train_end = int(n * train_frac)validation_end = train_end + int(n * validation_frac)[train, validation, test] corresponding to the shuffled rows in those three index ranges. The remaining rows after the validation split form the test set.The sum of train_frac and validation_frac is guaranteed to be less than or equal to 1.0.