wavesongs.optimizer#

A collection of functions to solve the minimization problem.

Functions

all_optimal_gammas(bird)

optimal(syllable[, params, method, Ns, ...])

optimal_a(syllable[, params, method, Ns, ...])

optimal_bs(syllable[, params, method, Ns, ...])

optimal_gamma(syllable[, params, method, ...])

optimal_params(syllable[, params, method, ...])

optimal_params_general(syllable[, params, ...])

residual(z, *params)

residual_correlation(z, *params)

residual_ff(z, *params)

residual_ff_b02(z, *params)

residual_ff_b1(z, *params)

residual_sci(z, *params)

residual_sci_a0(z, *params)

wavesongs.optimizer.residual(z: List[float], *params: Tuple) ndarray[source]#
Parameters:
  • z (list [a0,b0,b1,b2])

  • paramvs (tuple)

Returns:

SCIFF – Fundamental Frequency and Spectral Content Index scores

Return type:

np.ndarray

Examples

>>>
wavesongs.optimizer.residual_sci(z: List[float], *params: Tuple) ndarray[source]#
Parameters:
  • z (list [a0,b0,b1,b2])

  • paramvs (tuple)

Returns:

SCIFF – Fundamental Frequency and Spectral Content Index scores

Return type:

np.ndarray

Examples

>>>
wavesongs.optimizer.residual_sci_a0(z: List[float], *params: Tuple) ndarray[source]#
Parameters:
  • z (list)

  • params (tuple)

Returns:

SCIFF – Fundamental Frequency and Spectral Content Index scores

Return type:

np.ndarray

Examples

>>>
wavesongs.optimizer.residual_ff(z: List[float], *params: Tuple) ndarray[source]#
Parameters:
  • z (list)

  • params (tuple)

Returns:

SCIFF – Fundamental Frequency and Spectral Content Index scores

Return type:

np.ndarray

Examples

>>>
wavesongs.optimizer.residual_ff_b02(z: List[float], *params: Tuple) ndarray[source]#
Parameters:
  • z (list)

  • params (tuple)

Returns:

SCIFF – Fundamental Frequency and Spectral Content Index scores

Return type:

np.ndarray

Examples

>>>
wavesongs.optimizer.residual_ff_b1(z: List[float], *params: Tuple) ndarray[source]#
Parameters:
  • z (list)

  • params (tuple)

Returns:

SCIFF – Fundamental Frequency and Spectral Content Index scores

Return type:

np.ndarray

Examples

>>>
wavesongs.optimizer.residual_correlation(z: List[float], *params: Tuple) ndarray[source]#
Parameters:
  • z (list)

  • params (tuple)

Returns:

SCIFF – Fundamental Frequency and Spectral Content Index scores

Return type:

np.ndarray

Examples

>>>
wavesongs.optimizer.optimal(syllable, params: Dict = {'C': 343, 'Ch': 1.43e-10, 'L': 0.025, 'MB': 10000.0, 'MG': 20, 'RB': 5000000.0, 'Rh': 24000.0, 'gm': 40000.0, 'r': 0.65}, method: AnyStr = 'brute', Ns: int = 20, full_output: bool = True, disp: bool = True, workers: int = -1) Dict[source]#
Parameters:
  • syllable (Syllable)

  • params (dict)

  • method (str = "brute")

  • Ns (int, optional = 20)

  • full_output (bool, optional = False)

  • disp (bool, optional = False)

  • workers (int, optional = 1)

Returns:

parameters

Return type:

Dict

Examples

>>>
wavesongs.optimizer.optimal_bs(syllable, params: Dict = {'C': 343, 'Ch': 1.43e-10, 'L': 0.025, 'MB': 10000.0, 'MG': 20, 'RB': 5000000.0, 'Rh': 24000.0, 'gm': 40000.0, 'r': 0.65}, method: AnyStr = 'brute', Ns: int = 20, full_output: bool = True, disp: bool = True, workers: int = -1) Dict[source]#
Parameters:
  • syllable (Syllable)

  • params (dict)

  • method (str = "brute")

  • Ns (int, optional = 20)

  • full_output (bool, optional = False)

  • disp (bool, optional = False)

  • workers (int, optional = 1)

Returns:

params

Return type:

Dict

Examples

>>>
wavesongs.optimizer.optimal_a(syllable, params: Dict = {'C': 343, 'Ch': 1.43e-10, 'L': 0.025, 'MB': 10000.0, 'MG': 20, 'RB': 5000000.0, 'Rh': 24000.0, 'gm': 40000.0, 'r': 0.65}, method: AnyStr = 'brute', Ns: int = 20, full_output: bool = True, disp: bool = True, workers: int = -1) Dict[source]#
Parameters:
  • syllable (Syllable)

  • params (dict)

  • method (str = "brute")

  • Ns (int, optional = 20)

  • full_output (bool, optional = False)

  • disp (bool, optional = False)

  • workers (int, optional = 1)

Returns:

params

Return type:

Dict

Examples

>>>
wavesongs.optimizer.optimal_gamma(syllable, params: Dict = {'C': 343, 'Ch': 1.43e-10, 'L': 0.025, 'MB': 10000.0, 'MG': 20, 'RB': 5000000.0, 'Rh': 24000.0, 'gm': 40000.0, 'r': 0.65}, method: AnyStr = 'brute', Ns: int = 20, full_output: bool = True, disp: bool = True, workers: int = -1) Dict[source]#
Parameters:
  • syllable (Syllable)

  • params (dict)

  • method (str = "brute")

  • Ns (int, optional = 20)

  • full_output (bool, optional = False)

  • disp (bool, optional = False)

  • workers (int, optional = 1)

Returns:

parameters

Return type:

Dict

Examples

>>>
wavesongs.optimizer.optimal_params(syllable, params: Dict = {'C': 343, 'Ch': 1.43e-10, 'L': 0.025, 'MB': 10000.0, 'MG': 20, 'RB': 5000000.0, 'Rh': 24000.0, 'gm': 40000.0, 'r': 0.65}, method: AnyStr = 'brute', Ns: int = 20, full_output: bool = True, disp: bool = True, workers: int = -1) Dict[source]#
Parameters:
  • syllable (Syllable)

  • params (dict)

  • method (str = "brute")

  • Ns (int, optional = 20)

  • full_output (bool, optional = False)

  • disp (bool, optional = False)

  • workers (int, optional = 1)

Returns:

parameters

Return type:

Dict

Examples

>>>
wavesongs.optimizer.optimal_params_general(syllable, params: Dict = {'C': 343, 'Ch': 1.43e-10, 'L': 0.025, 'MB': 10000.0, 'MG': 20, 'RB': 5000000.0, 'Rh': 24000.0, 'gm': 40000.0, 'r': 0.65}, method: AnyStr = 'brute', Ns: int = 20, full_output: bool = True, disp: bool = True, workers: int = -1) Dict[source]#
Parameters:
  • syllable (Syllable)

  • params (dict)

  • method (str = "brute")

  • Ns (int, optional = 20)

  • full_output (bool, optional = False)

  • disp (bool, optional = False)

  • workers (int, optional = 1)

Returns:

parameters

Return type:

Dict

Examples

>>>
wavesongs.optimizer.all_optimal_gammas(bird)[source]#