aspcol.spatialcovarianceestimation.krr_estimation_cov_informed

aspcol.spatialcovarianceestimation.krr_estimation_cov_informed(ir_data, pos_mic, wave_num, reg_param, integral_pos_func, integral_volume, num_mc_samples, cov_data, cov_reg_param, cost_func=<function _cov_informed_krr_cost_frobenius>, kernel_func=None, kernel_args=None, num_steps=10000, learning_rate=0.01)

The proposed spatial covariance estimation method of [brunnstromSpatial2025].

Parameters:
  • ir_data (ndarray of shape (num_freq, num_source, num_data)) – the measured impulse responses to be used in the spatial covariance estimation

  • pos_mic (ndarray of shape (num_mic, 3)) – positions of the microphones

  • wave_num (ndarray of shape (num_freqs)) – the wavenumbers of all considered frequencies, defined as 2 pi f / c, where c is the speed of sound

  • reg_param (float) – regularization parameter for the kernel ridge regression

  • integral_pos_func (function or np.ndarray of shape (num_positions, 3)) – function that generates random positions with uniform distrbution for the integral. Should take an integer as input and return a ndarray of shape (num_positions, 3) alternatively a precomputed array of positions can be provided, in which case num_mc_samples is ignored

  • integral_volume (float) – volume of the integral region. Is needed to obtain the correct scaling of the spatial covariance

  • num_mc_samples (int) – number of Monte Carlo samples used in the integral approximation

  • cov_data (ndarray of shape (num_mic, num_mic, num_freqs)) – the spatial covariance matrices to be used in the cost function. This represents the current best estimate of the spatial covariance.

  • cov_reg_param (float) – The scaling parameter of the spatial covariance fitting term in the cost function. If this is set higher, the spatial covariance will be fitted more closely, at the expense of the ir_data fitting term.

  • cost_func (function, optional) – The cost function to be used in the optimization. The default is _cov_informed_krr_cost_frobenius. Other options are _cov_informed_krr_cost_gevd, _cov_informed_krr_cost_wishart, _cov_informed_krr_cost_airm, _cov_informed_krr_cost_wasserstein. They are all similar in implementation, and so it should be easy to add new cost functions.

  • kernel_func (function, optional) – kernel function used in the spatial covariance, by default the diffuse kernel. Any single-frequency kernel from kernelinterpolation.py can be used, such as the directional kernel.

  • kernel_args (list, optional) – additional arguments to the kernel function, by default None.

  • num_steps (int, optional) – number of optimization steps, by default 10000

Returns:

krr_params – The estimated kernel ridge regression parameters. They can be used to compute the spatial covariance using spatial_cov_from_integral_weighting. These could also be used to reconstruct the sound field at any position using the kernel interpolation method.

Return type:

ndarray of shape (num_freqs, num_source, num_mic)

References

[brunnstromSpatial2025] Jesper Brunnstrom, Martin Bo Møller, Jan Østergaard, Toon van Waterschoot, Marc Moonen, and Filip Elvander, Spatial covariance estimation for sound field reproduction using kernel ridge regression, European Signal Processing Conference (EUSIPCO), 2025.