Class EventStatisticsCalculate
Inherited Members
Namespace: AudioAnalysisTools.EventStatistics
Assembly: AudioAnalysisTools.dll
Syntax
public static class EventStatisticsCalculate
Methods
| Improve this Doc View SourceAnalyzeAudioEvent(AudioRecording, Interval<TimeSpan>, Interval<Double>, EventStatisticsConfiguration, TimeSpan)
Calculate summary statistics for supplied temporal and spectral targets.
Declaration
public static EventStatistics AnalyzeAudioEvent(AudioRecording recording, Interval<TimeSpan> temporalTarget, Interval<double> spectralTarget, EventStatisticsConfiguration config, TimeSpan segmentStartOffset)
Parameters
Type | Name | Description |
---|---|---|
AudioRecording | recording | as type AudioRecording which contains the event. |
Interval<TimeSpan> | temporalTarget | Both start and end bounds - relative to the supplied recording. |
Interval<Double> | spectralTarget | both bottom and top bounds in Hertz. |
EventStatisticsConfiguration | config | parameters that determine the outcome of the analysis. |
TimeSpan | segmentStartOffset | How long since the start of the recording this event occurred. |
Returns
Type | Description |
---|---|
EventStatistics | an instance of EventStatistics. |
Remarks
The acoustic statistics calculated in this method are based on methods outlined in "Acoustic classification of multiple simultaneous bird species: A multi-instance multi-label approach", by Forrest Briggs, Balaji Lakshminarayanan, Lawrence Neal, Xiaoli Z.Fern, Raviv Raich, Sarah J.K.Hadley, Adam S. Hadley, Matthew G. Betts, et al. The Journal of the Acoustical Society of America v131, pp4640 (2012); doi: http://dx.doi.org/10.1121/1.4707424 .. The Briggs feature are calculated from the column (freq bin) and row (frame) sums of the extracted spectrogram.
- Gini Index for frame and bin sums. A measure of dispersion. Problem with gini is that its value is dependent on the row or column count. We use entropy instead because value not dependent on row or column count because it is normalized. For the following meausres of k-central moments, the freq and time values are normalized in 0,1 to width of the event.
- freq-mean
- freq-variance
- freq-skew and kurtosis
- time-mean
- time-variance
- time-skew and kurtosis
- freq-max (normalized)
- time-max (normalized)
- Briggs et al also calculate a 16 value histogram of gradients for each event mask. We do not do that here although we could. ... NOTE 1: There are differences between our method of noise reduction and Briggs. Briggs does not convert to decibels and instead works with power values. He obtains a noise profile from the 20% of frames having the lowest energy sum. NOTE 2: To NormaliseMatrixValues for noise, they divide the actual energy by the noise value. This is equivalent to subtraction when working in decibels. There are advantages and disadvantages to Briggs method versus ours. In our case, we hve to convert decibel values back to energy values when calculating the statistics for the extracted acoustic event. NOTE 3: We do not calculate the higher central moments of the time/frequency profiles, i.e. skew and kurtosis. Ony mean and standard deviation. .. NOTE 4: This method assumes that the passed event occurs totally within the passed recording, AND that the passed recording is of sufficient duration to obtain reliable BGN noise profile BUT not so long as to cause memory constipation.
CalculateSpectralCentroid(Double[])
Returns the id of the bin which contains the spectral centroid.
Declaration
public static double CalculateSpectralCentroid(double[] spectrum)
Parameters
Type | Name | Description |
---|---|---|
Double[] | spectrum |
Returns
Type | Description |
---|---|
Double |