Select Batch Method
Randomly select a batch of samples from the training data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
X_train |
ndarray
|
Input training data. |
required |
Y_train |
ndarray
|
True labels for training data. |
required |
batch_size |
int
|
The size of the batch to select. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
tuple |
(X_batch, Y_batch) X_batch (numpy.ndarray): The selected batch of input data. Y_batch (numpy.ndarray): The corresponding batch of labels. |
Note
This function handles both 1D and 2D label arrays (Y_train).