dcase_util.containers.ProbabilityContainer.load

ProbabilityContainer.load(filename=None, fields=None, csv_header=True, file_format=None, delimiter=None, decimal='point')[source]

Load probability list from file

Preferred delimiter is tab, however, other delimiters are supported automatically (they are sniffed automatically).

Supported input formats:
  • [file(string)][label(string)][probability(float)]

Parameters
filenamestr

Path to the probability list in text format (csv). If none given, one given for class constructor is used. Default value None

fieldslist of str, optional

List of column names. Used only for CSV formatted files. Default value None

csv_headerbool, optional

Read field names from first line (header). Used only for CSV formatted files. Default value True

file_formatFileFormat, optional

Forced file format, use this when there is a miss-match between file extension and file format. Default value None

delimiterstr, optional

Forced data delimiter for csv format. If None given, automatic delimiter sniffer used. Use this when sniffer does not work. Default value None

decimalstr

Decimal ‘point’ or ‘comma’ Default value ‘point’

Returns
datalist of probability item dicts

List containing probability item dicts