pyhctsa.robust.bf_residual_stats¶
- pyhctsa.robust.bf_residual_stats(res, y)¶
Statistics of the residuals of a fit, for remaining structure (hctsa
BF_ResidualStats).The autocorrelation of the residuals at lags 1 and 2 (the Fourier method of
CO_AutoCorr) and a runs test (bf_runs_z()). The residuals are taken in the order given.All three outputs are NaN if the residuals have no variation beyond floating-point round-off, as for an exact fit: the autocorrelation and runs of round-off are not meaningful (and differ between implementations). The criterion is a standard deviation of the residuals of at most
10 * N * epstimes the root-mean-square of the fitted data (N values), a bound on the rounding error of a fit to them: a fitted value accumulates rounding over sums of up to N terms (at most aboutN * eps / 2of the magnitude of the data), and a sinusoid evaluated at times up to N has a phase rounding error of up to about1.5 * pi * N * eps(seepyhctsa.operations.pre_process.preproc_compare()). Small but genuine residuals, such as the quantization noise left by an exact fit to 24-bit data, are computed.