dcase_util.containers.BinaryMatrix2DContainer
- class dcase_util.containers.BinaryMatrix2DContainer(data=None, time_resolution=None, label_list=None, processing_chain=None, **kwargs)[source]
Two-dimensional data matrix container class, inherited from DataContainer.
Constructor
- Parameters
- filenamestr, optional
- datalist, optional
- statsdict, optional
- metadatadict, optional
- time_resolutionfloat
- processing_chainProcessingChain
- __init__(data=None, time_resolution=None, label_list=None, processing_chain=None, **kwargs)[source]
Constructor
- Parameters
- filenamestr, optional
- datalist, optional
- statsdict, optional
- metadatadict, optional
- time_resolutionfloat
- processing_chainProcessingChain
Methods
__init__([data, time_resolution, ...])Constructor
change_axis([time_axis, data_axis])Set axis
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
freeze()Freeze focus segment, copy segment to be container's data.
get_file_information()Get file information, filename
get_focused()Get focus segment from data matrix.
get_frames([frame_ids, vector_ids, frame_hop])Get frames from data matrix.
is_package([filename])Determine if the file is compressed package.
load([filename])Load file
log([level])Log container content
pad(length[, binary_matrix])Pad binary matrix along time axis
plot([plot, binary_matrix, data_container, ...])Visualize binary matrix, and optionally synced data matrix.
push_processing_chain_item(processor_name[, ...])Push processing chain item
reset_focus()Reset focus segment
save([filename])Save file
set_focus([start, stop, duration, ...])Set focus segment
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
TTransposed data in a data container
bytesFile size in bytes
Data matrix
focus_startFocus segment start
focus_stopFocus segment stop
Number of data frames
Number of data columns
loggerLogger instance
md5Checksum for file.
shapeShape of data matrix
statsBasic statistics of data matrix.
valid_formatsValid file formats
vector_lengthData vector length