Split

class audformat.Split(type='other', *, description=None, meta=None)[source]

Database split.

Defines if a subset of a database should be used for training, development or testing.

Parameters
Raises

BadValueError – if an invalid type is passed

Examples

>>> Split(define.SplitType.TEST)
{type: test}

__eq__()

Split.__eq__(other)

Return self==value.

Return type

bool

description

Split.description

Description

dump()

Split.dump(stream=None, indent=2)

Serialize object to YAML.

Parameters
  • stream – file-like object. If None serializes to string

  • indent (int) – indent

Return type

str

Returns

YAML string

from_dict()

Split.from_dict(d, ignore_keys=None)

Deserialize object from dictionary.

Parameters
  • d (dict) – dictionary of class variables to assign

  • ignore_keys (Optional[Sequence[str]]) – variables listed here will be ignored

meta

Split.meta

Dictionary with meta fields

to_dict()

Split.to_dict()

Serialize object to dictionary.

Return type

dict

Returns

dictionary with attributes

type

Split.type

Split type