Sample-weighted geometric mean
The sample-weighted geometric mean (SWGM) is a binwise combination method that computes each
as a weighted geometric mean of the samples
. The weights are computed as a function of the samples themselves and give more importance to smaller values, such that the SWGM is a compromise between the geometric mean and the minimum.
Further reading
Package release article: To be added.
D.Sc. thesis on combination methods: M. do V. M. da Costa, Novel time-frequency representations for music information retrieval, D.Sc., Federal University of Rio de Janeiro, Rio de Janeiro, Brasil (2020 Apr.).
SWGM reference paper: M. do V. M. da Costa and L. W. P. Biscainho, “Combining time-frequency representations for music information retrieval,” in 15th AES-Brasil Engineering Congress. Florianópolis, Brazil: Audio Engineering Society, Oct. 2017, pp. 12–18.
Calling signature
- ctfr.methods.swgm(signal, sr, *, <shared parameters>, beta, max_gamma)
- ctfr.methods.swgm_from_specs(specs, *, <shared parameters>, beta, max_gamma)
Note
As with all combination methods, you can also use ctfr.ctfr() or ctfr.ctfr_from_specs().
See ctfr.ctfr() and ctfr.ctfr_from_specs() for more details on the shared parameters for computing CTFRs with this package. The parameters specific to this method (passed as keyword arguments) are described below.
Parameters
beta (float, range: [0, 1], optional)
Factor used in the computation of weights for the geometric mean. When
beta = 0, the SWGM is equivalent to an unweighted geometric mean. Whenbeta = 1, the SWGM is equivalent to the minimum combination. Defaults to 0.3.
max_gamma (float >= 1, optional)
Maximum weight for the geometric mean. This parameter is used to avoid numerical instability when the weights are too large. Defaults to 20.