dcase_util.containers.DataArrayContainer
- class dcase_util.containers.DataArrayContainer(data=None, stats=None, metadata=None, time_resolution=None, processing_chain=None, **kwargs)[source]
Array data container class, inherited from DataContainer.
Constructor
- Parameters
- filenamestr, optional
File path Default value None
- datanumpy.ndarray, optional
Data to initialize the container Default value None
- statsdict, optional
Statistics of the data Default value None
- metadatadict or MetadataContainer, optional
MetadataContainer Default value None
- time_resolutionfloat, optional
Time resolution Default value None
- processing_chainProcessingChain, optional
Processing chain. Default value None
- __init__(data=None, stats=None, metadata=None, time_resolution=None, processing_chain=None, **kwargs)[source]
Constructor
- Parameters
- filenamestr, optional
File path Default value None
- datanumpy.ndarray, optional
Data to initialize the container Default value None
- statsdict, optional
Statistics of the data Default value None
- metadatadict or MetadataContainer, optional
MetadataContainer Default value None
- time_resolutionfloat, optional
Time resolution Default value None
- processing_chainProcessingChain, optional
Processing chain. Default value None
Methods
__init__
([data, stats, metadata, ...])Constructor
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 focus segment from data array.
get_frames
([frame_ids, frame_hop])Get frames from data array.
is_package
([filename])Determine if the file is compressed package.
load
([filename])Load file
log
([level])Log container content
plot
([plot, figsize])Visualize data array.
push_processing_chain_item
(processor_name[, ...])Push processing chain item
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
bytes
File size in bytes
Data matrix
Focus segment start
Focus segment stop
Number of data frames
Number of data columns
logger
Logger instance
md5
Checksum for file.
Shape of data matrix
Basic statistics of data matrix.
valid_formats
Valid file formats