asap-rs 0.2.0

Rust implementation of Automatic Smoothing for Attention Prioritization for Time Series
Documentation
  • Coverage
  • 15.79%
    3 out of 19 items documented1 out of 2 items with examples
  • Size
  • Source code size: 83.42 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 660.37 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • altunenes/asap-rs
    7 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • altunenes

asap-rs

crates.io License Rust

A Rust implementation of ASAP (Automatic Smoothing for Attention Prioritization), based on the paper "ASAP: Prioritizing Attention via Time Series Smoothing" learn more: source paper & js code:

This project provides a high-performance Rust implementation of the ASAP algorithm for time series smoothing. It aims to efficiently reduce complexity in time series data while preserving significant trends, optimized for visualization purposes.

asap

Usage

use asap_rs::smooth;
fn main() {
    // Example data
    let data = [1.0, 3.2, 2.0, 3.0, 4.0, 5.0, 4.0, 3.0, 2.0, 1.0];
    let resolution = 2;
    let smoothed_data = smooth(&data, resolution);
}

Rust vs JS Performance

🦀 Rust: 1.4776ms
🟨 JS: 8.96ms
  Data size: 500000
  Smoothed size: 25
  Original mean: 2499.97
  Smoothed mean: 2499.97