ace.supersmoother module

A variable-span data smoother.

This uses the fixed-span smoother to determine a changing optimal span for the data based on cross-validated residuals. It is an adaptive smoother that requires several passes over the data.

The SuperSmoother provides a mechanism to evaluate the conditional expectations in the ACE algorithm.

Based on [Friedman82].

Example:

s = SuperSmoother()
s.specify_data_set(x, y, sort_data = True)
s.compute()
smoothed_y = s.smooth_result
class ace.supersmoother.SuperSmoother[source]

Bases: Smoother

Variable-span smoother.

set_bass_enhancement(alpha)[source]

Bass enhancement amplifies the bass span.

This gives the resulting smooth a smoother look, which is sometimes desirable if the underlying mechanisms are known to be smooth.

compute()[source]

Run the SuperSmoother.

class ace.supersmoother.SuperSmootherWithPlots[source]

Bases: SuperSmoother

Auxiliary subclass for researching/understanding the SuperSmoother.