lawsynth/crates/lawsynth-preprocess
caelum0x 7a06febeb6 chore(release): inherit repository metadata on all crates
Crates inherited version/license/edition from [workspace.package] but not
`repository`, so every crate published without a repository link. Add
`repository.workspace = true` uniformly, completing the
description+version+license+repository metadata `cargo publish` and crates.io
expect. No build impact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-06 13:08:47 +03:00
..
2026-08-16 21:04:23 +03:00
2026-08-16 21:04:23 +03:00

lawsynth-preprocess

Reproducible numerical transforms for aligned time-series data. The crate provides imputation, linear resampling/alignment, detrending, standardization, moving-average smoothing, and an auditable pipeline of applied steps.

Use

use lawsynth_core::Identifier;
use lawsynth_data::{Dataset, NumericColumn, TimeAxis};
use lawsynth_preprocess::{moving_average, standardize};

let data = Dataset::new(TimeAxis::new(vec![0.0, 1.0, 2.0, 3.0])?,
    [NumericColumn::new(Identifier::new("x")?, vec![1.0, 3.0, 5.0, 7.0])])?;
let (smoothed, _) = moving_average(&data, 1)?;
let (scaled, report) = standardize(&smoothed)?;
assert_eq!(scaled.len(), 4);
assert!(report.standard_deviation["x"] > 0.0);
# Ok::<(), lawsynth_preprocess::PreprocessError>(())

Every transform reports its fitted values so it can be replayed on evaluation data. Boundary interpolation and imputation are modeling choices; this crate records them but cannot make them scientifically neutral.