skrf.vectorFitting.VectorFitting.get_rms_error

VectorFitting.get_rms_error(i=-1, j=-1, parameter_type='s')[source]

Returns the root-mean-square (rms) error magnitude of the fit, i.e. \(\sqrt{ \mathrm{mean}(|S - S_\mathrm{fit} |^2) }\), either for an individual response \(S_{i+1,j+1}\) or for larger slices of the network.

Parameters:
  • i (int, optional) – Row indices of the responses to be evaluated. Either a single row selected by an integer \(i \in [0, N_\mathrm{ports}-1]\), or multiple rows selected by a list of integers, or all rows selected by \(i = -1\) (default).

  • j (int, optional) – Column indices of the responses to be evaluated. Either a single column selected by an integer \(j \in [0, N_\mathrm{ports}-1]\), or multiple columns selected by a list of integers, or all columns selected by \(j = -1\) (default).

  • parameter_type (str, optional) – Representation type of the fitted frequency responses. Either scattering (s or S), impedance (z or Z) or admittance (y or Y).

Returns:

rms_error – The rms error magnitude between the vector fitted model and the original network data.

Return type:

ndarray

Raises:

ValueError – If the specified parameter representation type is not s, z, nor y.