Registry / analytics / supersmoother

supersmoother

JSON →
library0.4pypypiunverified

Python implementation of Friedman's Supersmoother (smooth regression). Current version 0.4, no longer actively maintained; last release in 2016.

pip install supersmoother
INSTALL
IMPORT
SIG · SUPERSMOOTHER
S
supersmoother
analyticspythonv0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Supersmoother
from supersmoother import Supersmoother
from supersmoother import Supersmoother

Basic usage: instantiate Supersmoother, fit, predict.

import numpy as np from supersmoother import Supersmoother x = np.linspace(0, 10, 100) y = np.sin(x) + 0.1 * np.random.randn(100) model = Supersmoother() model.fit(x, y) y_smooth = model.predict(x) print(y_smooth[:5])
Debug
Known issues
deprecatedThe .smooth() method is deprecated; use .fit() and .predict() instead.
fix
Replace model.smooth(x, y) with model.fit(x, y); y_smooth = model.predict(x).
affects: 0.3 and earlier
gotchaData must be sorted by x when using default smoother. Input x must be monotonically increasing.
fix
Sort arrays before fitting: idx = np.argsort(x); x = x[idx]; y = y[idx].
affects: all
gotchaSupersmoother does not handle missing values (NaN). Input must be clean.
fix
Remove NaN values prior to fitting: mask = ~(np.isnan(x) | np.isnan(y)); x = x[mask]; y = y[mask].
affects: all
Upgrade
Version history
0.4latest on PyPI · released May 6, 2017
Audit
Dependencies
numpyrequiredcore dependency
scipyoptionaloptional, used for sparse smoothing
Agent activity
18 hits · last 30 days
node
14
OpenAI (training)
1
Resources
supersmoother — pip install supersmoother · libregistry