twodlearn.datasets.Batch_generator module¶
-
class
twodlearn.datasets.Batch_generator.
BatchGenerator
(X, y, batch_size, RandomShuffle=True, task='classification')[source]¶ Bases:
object
Generates batches in form of a matrix, where each row constitutes a single sample
-
class
twodlearn.datasets.Batch_generator.
SeqBatchGenerator
(data, batch_size, window_size, out_format='tensor')[source]¶ Bases:
object
Generates batches for a single class, considering discontinuous data divided in pages.
For data that is piecewise continuous, each continuous part is called a page. Therefore the hole dataset is a list of pages.
The windows generated from the dataset contain only continuous data.
-
class
twodlearn.datasets.Batch_generator.
SeqMultiClassBatchGenerator
(data_in, batch_size, window_size, mrk=None, y=None, out_format='tensor', input_format='')[source]¶ Bases:
object
Generates batches of sequences for multiple classes
- Atributes:
bg_l: list containing the batch generator for each class
data: datset from where the batches are generated. Is structured as data[class][page] after initialization
n_classes: number of classes
batch_size:
window_size: