dcase_util.data.Aggregator

class dcase_util.data.Aggregator(win_length_frames=10, hop_length_frames=1, recipe=None, center=True, padding=True, **kwargs)[source]

Data aggregator

Constructor

Parameters
recipelist of dict or list of str

Aggregation recipe, supported methods [mean, std, cov, kurtosis, skew, flatten]. Default value None

win_length_framesint

Window length in data frames Default value 10

hop_length_framesint

Hop length in data frames Default value 1

centerbool

Centering of the window Default value True

paddingbool

Padding of the first window with the first frame and last window with last frame to have equal length data in the windows. Default value True

__init__(win_length_frames=10, hop_length_frames=1, recipe=None, center=True, padding=True, **kwargs)[source]

Constructor

Parameters
recipelist of dict or list of str

Aggregation recipe, supported methods [mean, std, cov, kurtosis, skew, flatten]. Default value None

win_length_framesint

Window length in data frames Default value 10

hop_length_framesint

Hop length in data frames Default value 1

centerbool

Centering of the window Default value True

paddingbool

Padding of the first window with the first frame and last window with last frame to have equal length data in the windows. Default value True

Methods

__init__([win_length_frames, ...])

Constructor

aggregate([data])

Aggregate data

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

is_package([filename])

Determine if the file is compressed package.

load([filename])

Load file

log([level])

Log container content

save([filename])

Save file

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

valid_method