razorback.mestimator module

Implementation of the M-estimate method.

razorback.mestimator.transfer_error(outputs, inputs, transfer, invalid_idx)

from [Egbert, Booker (1986)] Appendix A.2 https://doi.org/10.1111/j.1365-246X.1986.tb04552.x

razorback.mestimator.transfer_function(outputs, inputs, weights=(None,), init=None, invalid_idx=None, **options)

estimate the transfer function (tensor) beetwen inputs and outputs

transfer, invalid_idx = transfer_function(outputs, inputs, …)

outputs = transfer.dot(inputs)

Estimation is made using the M-estimate method.

Parameters:
  • outputs (list of P array of shape (N,))

  • inputs (list of Q array of shape (N,))

  • weights (list of weighting function)

  • init (array) – initial guess for transfer

  • invalid_idx (None or 1d-array or list of P 1d-array)

  • options (options passed to m_estimate()) –

    • tol

    • maxit

    • eps

Returns:

  • transfer (array of shape (P, Q)) – outputs = transfer.dot(inputs)

  • invalid_idx (list of P 1d-array) – indices rejected from inputs and outputs during the estimation