derivkit.local_polynomial_derivative.diagnostics module¶
Diagnostics for local polynomial derivative estimation.
- derivkit.local_polynomial_derivative.diagnostics.make_diagnostics(x0: float, config: LocalPolyConfig, xs: ndarray, ys: ndarray, used: ndarray, coeffs: ndarray, degree: int, order: int, ok: bool) Dict[str, Any]¶
Builds diagnostics dictionary.
- Parameters:
x0 – The center point for polynomial fitting.
config – LocalPolyConfig instance with fitting settings.
xs – An array of sample points (shape (n_samples,)).
ys – An array of function evaluations (shape (n_samples, n_components)).
used – A boolean array indicating which samples were used (shape (n_samples,)).
coeffs – The polynomial coefficients (shape (degree + 1, n_components)).
degree – The degree of the polynomial fit.
order – The order of the derivative being estimated.
ok – Whether the fit met the residual tolerances.
- Returns:
A diagnostics dictionary.