vishack.core.evaluate

Evaluate statistical quantities from frequency series.

Functions

mae(data, reference)

Maximum absolute error between the data and the reference

mse(data, reference)

Mean-square-error between the data and reference data.

rms(data[, df])

Calculated the expected root-mean-square value from the data

wmae(data, reference)

Maximum absolute error between the whitened data and the reference

wmse(data, reference)

Mean-square-error between the whitened data and reference data.

wrms(data[, df, whitening])

Whiten the data and calcuate the expected root-mean-square value.

vishack.core.evaluate.mae(data, reference)

Maximum absolute error between the data and the reference

Parameters
  • data (array) – The data to be evaluted

  • reference (array) – The reference data.

Returns

The maximum absolute error between the data and the reference

Return type

float

vishack.core.evaluate.mse(data, reference)

Mean-square-error between the data and reference data.

Parameters
  • data (array) – The data to be evaluted

  • reference (array) – The reference data.

Returns

The mean-square-error between the data and the reference.

Return type

float

vishack.core.evaluate.rms(data, df=1.0)

Calculated the expected root-mean-square value from the data

Parameters
  • data (array) – The data to be evaluated

  • df (float, optional) – The frequency spacing between data points. Default to be 1.

Returns

The expected RMS.

Return type

float

Note

Complex arrays are accepted. Absolute values will be taken after whitening. If the data is an amplitude spectral density, then the output will be the expected RMS. If the data is a transfer function, then the output will be the 2-norm.

vishack.core.evaluate.wmae(data, reference)

Maximum absolute error between the whitened data and the reference

Parameters
  • data (array) – The data to be evaluted

  • reference (array) – The reference data.

Returns

The maximum absolute error between the data and the reference whitened by the inverse of the reference.

Return type

float

vishack.core.evaluate.wmse(data, reference)

Mean-square-error between the whitened data and reference data.

Parameters
  • data (array) – The data to be evaluted

  • reference (array) – The reference data.

Returns

The mean-square-error between the data and the reference whitened by the inverse of the reference.

Return type

float

vishack.core.evaluate.wrms(data, df=1.0, whitening=None)

Whiten the data and calcuate the expected root-mean-square value.

Parameters
  • data (array) – The data to be evaluated.

  • df (float, optional) – The frequency spacing between data points. Default to be 1.

  • whitening (array, optional) – The whitening/weighting function. If None, default to be ones.

Returns

The whitened expected RMS.

Return type

float

Note

Complex arrays are accepted. Absolute values will be taken after whitening. If the data is an amplitude spectral density, then the output will be the expected RMS. If the data is a transfer function, then the output will be the 2-norm.