dcase_framework.features.FeatureRepository¶
-
class
dcase_framework.features.FeatureRepository(*args, **kwargs)[source]¶ Feature repository
Feature containers for each type of features are stored in a dict. Type name is used as key.
Constructor
Parameters: filename_dict: dict
Dict of file paths, feature extraction method label as key, and filename as value. If given, features are loaded in the initialization stage. Default value “None”
features: list, optional
-
__init__(*args, **kwargs)[source]¶ Constructor
Parameters: filename_dict: dict
Dict of file paths, feature extraction method label as key, and filename as value. If given, features are loaded in the initialization stage. Default value “None”
features: list, optional
Methods
__init__(\*args, \*\*kwargs)Constructor clear(() -> None. Remove all items from D.)copy(() -> a shallow copy of D)detect_file_format(filename)Detect file format from extension empty()Check if file is empty exists()Checks that file exists fromkeys(...)v defaults to None. get((k[,d]) -> D[k] if k in D, ...)get_dump_content(data)Clean internal content for saving get_file_information()Get file information, filename get_hash([data])Get unique hash string (md5) for given parameter dict get_hash_for_path([dotted_path])get_path(dotted_path[, default, data])Get value from nested dict with dotted path has_key((k) -> True if D has a key k, else False)items(() -> list of D’s (key, value) pairs, ...)iteritems(() -> an iterator over the (key, ...)iterkeys(() -> an iterator over the keys of D)itervalues(...)keys(() -> list of D’s keys)load([filename_dict])Load file list log([level])Log container content merge(override[, target])Recursive dict merge pop((k[,d]) -> v, ...)If key is not found, d is returned if given, otherwise KeyError is raised popitem(() -> (k, v), ...)2-tuple; but raise KeyError if D is empty. save(\*args, \*\*kwargs)Save file set_path(dotted_path, new_value[, data])Set value in nested dict with dotted path setdefault((k[,d]) -> D.get(k,d), ...)show()Print container content update(([E, ...)If E present and has a .keys() method, does: for k in E: D[k] = E[k] values(() -> list of D’s values)viewitems(...)viewkeys(...)viewvalues(...)Attributes
valid_formats-