dcase_util.data.Normalizer
- class dcase_util.data.Normalizer(n=None, s1=None, s2=None, mean=None, std=None, **kwargs)[source]
Data normalizer to accumulate data statistics
__init__ method.
- Parameters
- nint
Item count used to calculate statistics Default value None
- s1np.array [shape=(vector_length,)]
Vector-wise sum of the data seen by the Normalizer Default value None
- s2np.array [shape=(vector_length,)]
Vector-wise sum^2 of the data seen by the Normalizer Default value None
- meannp.ndarray() [shape=(vector_length, 1)]
Mean of the data Default value None
- stdnp.ndarray() [shape=(vector_length, 1)]
Standard deviation of the data Default value None
- __init__(n=None, s1=None, s2=None, mean=None, std=None, **kwargs)[source]
__init__ method.
- Parameters
- nint
Item count used to calculate statistics Default value None
- s1np.array [shape=(vector_length,)]
Vector-wise sum of the data seen by the Normalizer Default value None
- s2np.array [shape=(vector_length,)]
Vector-wise sum^2 of the data seen by the Normalizer Default value None
- meannp.ndarray() [shape=(vector_length, 1)]
Mean of the data Default value None
- stdnp.ndarray() [shape=(vector_length, 1)]
Standard deviation of the data Default value None
Methods
__init__([n, s1, s2, mean, std])__init__ method.
accumulate(data[, time_axis])Accumulate statistics
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
finalize()Finalize statistics calculation
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
normalize(data, **kwargs)Normalize data matrix with internal statistics of the class.
plot([plot, figsize])Visualize normalization factors.
reset()Reset internal variables.
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
bytesFile size in bytes
loggerLogger instance
md5Checksum for file.
Mean vector
Standard deviation vector
valid_formatsValid file formats