dcase_util.containers.ProbabilityContainer

class dcase_util.containers.ProbabilityContainer(*args, **kwargs)[source]

Probability data container class, inherited from ListDictContainer.

Constructor

Parameters
filenamestr, optional

File path

__init__(*args, **kwargs)[source]

Constructor

Parameters
filenamestr, optional

File path

Methods

__init__(*args, **kwargs)

Constructor

append(item)

Append item to the meta data list

as_matrix([label_list, filename, file_list, ...])

Get probabilities as data matrix.

clear(/)

Remove all items from list.

copy(/)

Return a shallow copy of the list.

count(value, /)

Return number of occurrences of value.

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

extend(iterable, /)

Extend list by appending elements from the iterable.

filter([filename, file_list, label, index])

Filter content

get_dump_content(data)

Clean internal content for saving

get_field(field_name[, skip_items_without_field])

Get all data from field.

get_field_unique(field_name)

Get unique data from field.

get_file_information()

Get file information, filename

index(value[, start, stop])

Return first index of value.

insert(index, object, /)

Insert object before index.

is_package([filename])

Determine if the file is compressed package.

load([filename, fields, csv_header, ...])

Load probability list from file

log([level])

Log container content

pop([index])

Remove and return item at index (default last).

remove(value, /)

Remove first occurrence of value.

remove_field(field_name)

Remove field from data items

reverse(/)

Reverse IN PLACE.

save([filename, fields, csv_header, ...])

Save content to csv file

search(key, value)

Search in the list of dictionaries

show([mode, indent, visualize])

Print container content

sort(*[, key, reverse])

Sort the list in ascending order and return None.

to_html([indent])

Get container information in a HTML formatted string

to_string([ui, indent])

Get container information in a string

update(data)

Replace content with given list

validate_format()

Validate file format

Attributes

bytes

File size in bytes

logger

Logger instance

md5

Checksum for file.

unique_files

Unique files

unique_indices

Unique indices

unique_labels

Unique labels

valid_formats

Valid file formats