def next_batch(X, y, batch_size):
    """
    Generating a batch of random data.
    :param x_train:
    :param batch_size:
    :return:
    """
    idx = np.random.choice(len(X), size=batch_size)
    X_batch = X[idx]
    y_batch = y[:, idx]
    return X_batch, y_batch

    Generating a batch of random data.
    :param x_train:
    :param batch_size:
    :return:
    
codes/2-basics_in_machine_learning/multiclass_svm/code/multiclass_svm.py