incline.NaiveDifference

class incline.NaiveDifference[source]

Central finite differences on the raw series.

The estimator the package exists to argue against: it does no smoothing, so it inherits the noise directly. Kept because the comparison is the point, and because its exact variance makes that comparison quantitative. A finite difference requires at least two observations.

__init__()
Return type:

None

Methods

__init__()

analytic_operators(axis, derivative_order)

The difference stencil, written down directly.

bootstrap_uncertainty(estimate, axis, y, ...)

Bootstrap a nonlinear smoother, preserving short-range dependence.

evaluate(axis, y, derivative_order)

Average the forward and backward difference at each point.

evaluate_with_noise(axis, y, ...)

Evaluate, allowing an adaptive smoother to use a fitted covariance.

fit(axis, y[, derivative_order, ...])

Estimate the trend and, optionally, its uncertainty.

native_posterior(axis, y, derivative_order, ...)

Uncertainty from the smoother's own probability model.

operators(axis, derivative_order)

The smoothing and derivative operators for this configuration.

params()

Smoother-specific settings, recorded on the result.

scale_of(axis)

Return None because finite differencing has no bandwidth.

with_scale(scale, axis)

Reject a scale because finite differencing has no bandwidth.

Attributes

has_native_posterior

is_linear

Whether the derivative is a fixed linear map of the data.

linear

name

requires_regular_grid

supported_orders

uses_noise_for_fit

Whether a supplied noise model can change the point estimate.

name: ClassVar[str] = 'naive'
linear: ClassVar[bool] = True
supported_orders: ClassVar[frozenset[int]] = frozenset({1})
requires_regular_grid: ClassVar[bool] = True
evaluate(axis, y, derivative_order)[source]

Average the forward and backward difference at each point.

Parameters:
  • axis (TimeAxis)

  • y (npt.NDArray[np.float64])

  • derivative_order (int)

Return type:

Evaluation

analytic_operators(axis, derivative_order)[source]

The difference stencil, written down directly.

Parameters:
Return type:

tuple[npt.NDArray[np.float64], npt.NDArray[np.float64]] | None

with_scale(scale, axis)[source]

Reject a scale because finite differencing has no bandwidth.

Parameters:
Return type:

Self

scale_of(axis)[source]

Return None because finite differencing has no bandwidth.

Parameters:

axis (TimeAxis)

Return type:

None