Base class of dataset splitters.
Each splitter should be initialized with all its necessary parameters. The
final splitting is done running the splitter object on a certain Dataset
via __call__(). This method has to be implemented like a generator, i.e. it
has to return every possible split with a yield() call.
Each split has to be returned as a sequence of Datasets. The properties
of the splitted dataset may vary between implementations. It is possible
to declare a sequence element as 'None'.
Please note, that even if there is only one Dataset returned it has to be
an element in a sequence and not just the Dataset object!
|
__init__(self,
nperlabel=' all ' ,
nrunspersplit=1,
permute=False,
attr=' chunks ' )
Initialize splitter base. |
source code
|
|
|
|
|
|
|
|
|
splitDataset(self,
dataset,
specs)
Split a dataset by separating the samples where the configured
sample attribute matches an element of specs . |
source code
|
|
|
|
|
splitcfg(self,
dataset)
Return splitcfg for a given dataset |
source code
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__
|