xdem.fit#

Functions to perform normal, weighted and robust fitting.

Functions

huber_loss(z)

Huber loss cost (reduces the weight of outliers) :type z: ndarray[Any, dtype[floating[Any]]] :param z: Residuals between predicted and true values :rtype: float :return: Huber cost

polynomial_1d(xx, *params)

N-order 1D polynomial.

polynomial_2d(xx, *params)

N-order 2D polynomial.

rmse(z)

Return root mean square error :type z: ndarray[Any, dtype[floating[Any]]] :param z: Residuals between predicted and true value :rtype: float :return: Root Mean Square Error

robust_nfreq_sumsin_fit(xdata, ydata[, ...])

Given 1D vectors x and y, compute a robust sum of sinusoid fit to the data.

robust_norder_polynomial_fit(xdata, ydata[, ...])

Given 1D vectors x and y, compute a robust polynomial fit to the data.

soft_loss(z[, scale])

Soft loss cost (reduces the weight of outliers) :type z: ndarray[Any, dtype[floating[Any]]] :param z: Residuals between predicted and true values :type scale: float :param scale: Scale factor :rtype: float :return: Soft loss cost

sumsin_1d(xx, *params)

Sum of N sinusoids in 1D.