dcase_util.data.Sequencer
- class dcase_util.data.Sequencer(sequence_length=10, hop_length=None, padding=None, shift_border='roll', shift=0, required_data_amount_per_segment=0.9, **kwargs)[source]
Data sequencer
__init__ method.
- Parameters
- sequence_lengthint
Sequence length Default value 10
- hop_lengthint
Hop value of when forming the sequence, if None then hop length equals to sequence_length (non-overlapping sequences). Default value None
- padding: str
How data is treated at the boundaries [None, ‘zero’, ‘repeat’] Default value None
- shift_borderstring, [‘roll’, ‘shift’]
Sequence border handling when doing temporal shifting. Default value roll
- shiftint
Sequencing grid shift. Default value 0
- required_data_amount_per_segmentfloat [0,1]
Percentage of valid data items per segment there need to be for valid segment. Use this parameter to filter out part of the non-full segments. Default value 0.9
- __init__(sequence_length=10, hop_length=None, padding=None, shift_border='roll', shift=0, required_data_amount_per_segment=0.9, **kwargs)[source]
__init__ method.
- Parameters
- sequence_lengthint
Sequence length Default value 10
- hop_lengthint
Hop value of when forming the sequence, if None then hop length equals to sequence_length (non-overlapping sequences). Default value None
- padding: str
How data is treated at the boundaries [None, ‘zero’, ‘repeat’] Default value None
- shift_borderstring, [‘roll’, ‘shift’]
Sequence border handling when doing temporal shifting. Default value roll
- shiftint
Sequencing grid shift. Default value 0
- required_data_amount_per_segmentfloat [0,1]
Percentage of valid data items per segment there need to be for valid segment. Use this parameter to filter out part of the non-full segments. Default value 0.9
Methods
__init__
([sequence_length, hop_length, ...])__init__ method.
delimiter
([exclude_delimiters])Use csv.sniffer to guess delimiter for CSV file
detect_file_format
([filename])Detect file format from extension
empty
()Check if file is empty
exists
()Checks that file exists
get_file_information
()Get file information, filename
increase_shifting
([shift_step])Increase temporal shifting
is_package
([filename])Determine if the file is compressed package.
load
([filename])Load file
log
([level])Log container content
save
([filename])Save file
sequence
(data[, shift])Convert 2D data matrix into sequence of specified length 2D matrices
show
([mode, indent, visualize])Print container content
to_html
([indent])Get container information in a HTML formatted string
to_string
([ui, indent])Get container information in a string
validate_format
()Validate file format
Attributes
bytes
File size in bytes
logger
Logger instance
md5
Checksum for file.
valid_formats
Valid file formats