https://github.com/kaymal/auto-smooth

Smoothing noisy time series data.

https://github.com/kaymal/auto-smooth

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: acs.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.1%) to scientific vocabulary

Keywords

data-science filtering lowpass-filter savgol smoothing smoothing-filters time-series
Last synced: 5 months ago · JSON representation

Repository

Smoothing noisy time series data.

Basic Info
Statistics
  • Stars: 7
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
data-science filtering lowpass-filter savgol smoothing smoothing-filters time-series
Created over 3 years ago · Last pushed about 3 years ago

https://github.com/kaymal/auto-smooth/blob/main/

# Auto Smooth

[![License](https://img.shields.io/github/license/kaymal/auto-smooth)](https://github.com/kaymal/auto-smooth/blob/main/LICENSE)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Apply data smoothing/filtering to a time series by automatically selecting parameters.

Currently available smoothing/filtering techniques in the package:
- SavitzkyGolay filter 

## Quickstart

```python
from auto_smooth import auto_savgol

# apply savgol filter
data_filtered = auto_savgol(data)

>>> wl_best=7, po_best=2
```

![original_vs_smooth](docs/images/original_vs_smooth.png)

## Savitzky-Golay Filtering

SavitzkyGolay (Abraham Savitzky and Marcel J. E. Golay) filter is a type of low-pass filter used for smoothing noisy data.[^1] It is based on local least-squares fitting.[^2]

`auto_savgol` method applies a SavitzkyGolay filter using the [scipy](https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.savgol_filter.html) `savgol_filter()` method.


```python
from auto_smooth import auto_savgol

# apply savgol filter
data_filtered = auto_savgol(data)

# pass window-length and polynomial-order arguments
data_filtered = auto_savgol(data, wl_min=10, wl_max=30, po_min=2, po_max=10)
```

## References

[^1]: https://scipy-cookbook.readthedocs.io/items/SavitzkyGolay.html
[^2]: https://pubs.acs.org/doi/10.1021/acsmeasuresciau.1c00054
- [Smoothing and Differentiation of Data by Simplified Least Squares Procedures](https://agora.cs.wcu.edu/~huffman/figures/sgpaper1964.pdf)
- [Scipy savgol filter](https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.savgol_filter.html)
- [SavitzkyGolay](https://en.wikipedia.org/wiki/SavitzkyGolay_filter)
- [Convolution](https://en.wikipedia.org/wiki/Convolution)
- [What Is a Savitzky-Golay Filter?](https://inst.eecs.berkeley.edu/~ee123/sp18/docs/SGFilter.pdf)

Owner

  • Name: Kaymal
  • Login: kaymal
  • Kind: user

Data Science | Computer Science | Operations Research

GitHub Events

Total
Last Year

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 14 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
pypi.org: auto-smooth

Apply auto smoothing to a time series data.

  • Documentation: https://auto-smooth.readthedocs.io/
  • License: MIT License Copyright (c) 2022 T.Kaymal Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 0.1.0
    published almost 3 years ago
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 14 Last month
Rankings
Dependent packages count: 7.3%
Average: 24.1%
Dependent repos count: 40.9%
Maintainers (1)
Last synced: 6 months ago