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.

__init__()
Return type:

None

Methods

__init__()

analytic_operators(axis, order)

The difference stencil, written down directly.

evaluate(axis, y, order)

Average the forward and backward difference at each point.

fit(axis, y[, order, se, noise, ...])

Estimate the trend and, optionally, its uncertainty.

native_posterior(axis, y, order, ...)

Uncertainty from the smoother's own probability model.

operators(axis, order)

The smoothing and derivative operators for this configuration.

params()

Smoother-specific settings, recorded on the result.

scale_of(axis)

The narrowest scale there is: one observation.

with_scale(scale, axis)

No scale to set; 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

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

Average the forward and backward difference at each point.

Parameters:
  • axis (TimeAxis)

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

  • order (int)

Return type:

Evaluation

analytic_operators(axis, 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]

No scale to set; finite differencing has no bandwidth.

Parameters:
Return type:

Self

scale_of(axis)[source]

The narrowest scale there is: one observation.

Parameters:

axis (TimeAxis)

Return type:

float