Registry / data / tsmoothie

tsmoothie

JSON →
library1.0.5pypypi✓ verified 81d ago

A Python library for timeseries smoothing and outlier detection in a vectorized way. It provides multiple smoothing techniques (e.g., Convolutional, Exponential, Lowess, Kalman, Spectral) and outlier detection methods. Current version is 1.0.5. Release cadence is intermittent.

pip install tsmoothie
INSTALL
IMPORT
SIG · TSMOOTHIE
T
tsmoothie
datapythonv1.0.5
Install
7.4s avg
Import
Disk
230MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 231MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.4s · import 0.000s · 222MB
230MB installed
● package 230MB
Code
Verified usage

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

ConvolutionSmoother
from tsmoothie import ConvolutionSmoother
from tsmoothie.smoother import ConvolutionalSmoother
ExponentialSmoother
from tsmoothie import ExponentialSmoother
LowessSmoother
from tsmoothie import LowessSmoother

Basic smoothing with LowessSmoother. Tsmoothie operates on 2D arrays (time series in rows). Ensure data is float and shape (n_series, n_points).

import numpy as np from tsmoothie.smoother import LowessSmoother # Generate noisy data np.random.seed(42) data = np.cumsum(np.random.randn(100)) + 10 # Set up smoother smoother = LowessSmoother(smooth_fraction=0.1, iterations=1) smoother.smooth(data) # Access smoothed and intervals smoothed = smoother.smooth_data[0] low, up = smoother.get_intervals('prediction_interval') print('Smoothed:', smoothed[:5])
Debug
Known issues
gotchaData must be 2D array-like of shape (n_series, n_points). Even a single series must be shaped (1, n_points) or a list of lists.
fix
If you have a 1D array x, use x.reshape(1, -1) or [x] before passing to smoother.
affects: all
gotchaSmoothers expect data in float dtype. Integer arrays may cause incorrect results or errors.
fix
Convert data to float: data.astype(float).
affects: all
breakingIn v1.0.2, the code was restructured: many imports moved to submodules. Previously some classes might have been importable directly from tsmoothie.
fix
Use from tsmoothie.smoother import ... instead of from tsmoothie import ...
affects: >=1.0.2
deprecatedThe method 'get_intervals' parameter 'prediction_interval' is still valid, but future versions may change the API. No official deprecation yet.
fix
Stay updated with CHANGELOG.
affects: all
Upgrade
Version history
1.0.5latest on PyPI · released Nov 23, 2023
Audit
Dependencies
numpyrequiredCore dependency for array operations
scipyrequiredRequired for some smoothing methods (e.g., Lowess, Spline)
scikit-learnoptionalUsed for KNN-based outlier detection
statsmodelsoptionalRequired for DecomposeSmoother and some statistical tests
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
tsmoothie — pip install tsmoothie · libregistry