Skip to main content

Module preprocess

Module preprocess 

Source
Expand description

§Chronix Preprocessing Pipeline

Gap detection, interpolation, smoothing, resampling, and clock drift correction for time-series data — all operating on Arrow-compatible &[f64] / &[i64] arrays with zero-copy where possible.

§Pipeline Order

Raw data → Clock drift correction → Gap detection → Interpolation → Smoothing → Resampling

§Interpolation Methods

  • Linear — linearly interpolated values between known points
  • Nearest — nearest neighbor fill
  • CatmullRom — Catmull-Rom spline (C1 local interpolation, requires ≥ 4 surrounding points)
  • Zero — fill with 0.0
  • Forward — last known value carried forward
  • Nocb — next observation carried backward

§Smoothing Filters

  • ExponentialSmoother — single-pass EMA with configurable alpha
  • MovingAverageSmoother — sliding window mean
  • WeightedMovingAverage — custom weight vector

Re-exports§

pub use arrow_adapters::arrow_interpolate;
pub use arrow_adapters::arrow_preprocess;
pub use arrow_adapters::arrow_smooth;
pub use arrow_adapters::ArrowPreprocessResult;
pub use auto_features::AutoFeatureConfig;
pub use auto_features::FeatureMatrix;
pub use decomposition::detect_period;
pub use decomposition::detect_period_with_threshold;
pub use decomposition::stl_decompose;
pub use decomposition::Decomposition;
pub use decomposition::DecompositionError;
pub use decomposition::SeasonalDecomposer;
pub use decomposition::StlConfig;
pub use decomposition::StlDecomposer;
pub use features::diff;
pub use features::ewm;
pub use features::lag;
pub use features::pct_change;
pub use features::rolling_corr;
pub use features::rolling_mean;
pub use features::rolling_std;
pub use features::zscore;

Modules§

arrow_adapters
Arrow-native wrappers for preprocessing operations.
auto_features
Automatic feature generation for time-series data.
decomposition
Seasonal-Trend decomposition using Loess (STL).
features
Temporal feature extraction functions for time-series data.

Structs§

ClockDriftDetector
Detects and corrects clock drift in timestamp arrays.
DriftReport
Report of clock drift detection and correction.
ExponentialSmoother
Exponential smoothing with configurable alpha (0..1).
GapDetector
Detects gaps in a sorted timestamp column where the interval exceeds expected_interval × tolerance.
MovingAverageSmoother
Simple moving average with configurable window size.
PreprocessConfig
Configuration for the preprocessing pipeline.
PreprocessPipeline
Preprocessing pipeline.
PreprocessResult
Result of a preprocessing pipeline run.
ResampleConfig
Configuration for resampling.
Resampler
Resampler converts time-series data from one interval to another.
WeightedMovingAverage
Weighted moving average with custom weight vector.

Enums§

AggregationFn
Aggregation function for downsampling.
ClockDriftStrategy
Strategy for clock drift correction.
InterpolationError
Errors that can occur during interpolation.
Interpolator
Interpolation strategy for gap filling.
PreprocessError
Preprocessing errors.
Smoother
Smoothing method enum for configuration.