dcase_util.data.DecisionEncoder

class dcase_util.data.DecisionEncoder(label_list=None, **kwargs)[source]

Constructor

Parameters
label_listlist or str

Label list Default value None

__init__(label_list=None, **kwargs)[source]

Constructor

Parameters
label_listlist or str

Label list Default value None

Methods

__init__([label_list])

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

find_contiguous_regions(activity_array)

Find contiguous regions from bool valued numpy.array.

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

majority_vote(frame_decisions[, time_axis])

Majority vote.

many_hot(frame_decisions[, label_list, ...])

Many hot

process_activity(activity_matrix, window_length)

Process activity array (binary)

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