dcase_framework.features.FeatureContainer¶
-
class
dcase_framework.features.
FeatureContainer
(*args, **kwargs)[source]¶ Feature container inherited from dict
Container has following internal structure:
- feat, list of feature matrices, [channel][frames,feature_vector]
- stat, list of feature statistics
- meta, dict with feature meta data
Constructor
Parameters: filename: str, optional
If filename is given container is loaded in the initialization stage. Default value “None”
features: list, optional
-
__init__
(*args, **kwargs)[source]¶ Constructor
Parameters: filename: str, optional
If filename is given container is 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, filename_dict])Load data into container 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
channels
Number of feature channels feat
Feature data frames
Number of feature frames meta
Meta data shape
Shape of feature matrix stat
Statistics of feature data valid_formats
vector_length
Feature vector length