Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

muffler

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

muffler

Denoising time-series data.

  • 0.2.0
  • PyPI
  • Socket score

Maintainers
1

Muffler

Denoising Time-Series Data

Installation

pip install muffler

Usage

import muffler
import numpy as np

# Generate some noisy data
t = np.linspace(0, 1, 100)
clean_signal = np.sin(2 * np.pi * t)

# Add some noise
std = 1.0
conditional_noise = np.sqrt(np.abs(clean))
random_noise = np.random.normal(0, std, t.shape)
noisy_signal = clean + random_noise * conditional_noise

# Denoise the data
window_size = 100
stride = 25
denoised_signal = muffler.denoise_linear_regression(noisy_signal, window_size, stride)

# Compute the error
error = np.mean(np.sqrt(np.mean((clean_signal - denoised_signal) ** 2, axis=1)))
print(f"Error: {error:.2e}")

Streamlit App (An example)

You can also use the streamlit app to see how the denoising works. To run the app, you need to install Rust and Maturin for compiling the code. Then, you need to create a Python (3.9 or greater) virtual environment and install the dependencies:

python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
maturin develop --release --extras=dev

Finally, you can run the app:

streamlit run examples/app.py

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

TODO: Add citation

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc