package matrix

  1. Overview
  2. Docs
Fast, modern terminal toolkit for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mosaic-0.1.0.tbz
sha256=9e4e90d17f9b2af1b07071fe425bc2c519c849c4f1d1ab73cde512be2d874849
sha512=06e9c4a741590942e81a27738d0b5c0413fafec8cf3b7dae047ad69f155e7b718aa4223818dc161b7d028efffcfd3365905e264d6fd31d453910ddfa91dcf9b9

doc/matrix.charts/Matrix_charts/Transform/index.html

Module Matrix_charts.TransformSource

Data smoothing and transformation.

All transforms operate on (x, y) arrays, preserving x-values and smoothing y-values. The input array is not modified. Empty arrays produce empty output.

Sourceval ema : float -> (float * float) array -> (float * float) array

ema alpha data is the exponential moving average of data. alpha is the smoothing factor in [0, 1]; higher values weight recent observations more heavily.

Sourceval sma : int -> (float * float) array -> (float * float) array

sma window data is the simple moving average of data over window points. For indices before the window is full a partial average is used. Empty if window <= 0.

Sourceval gaussian : float -> (float * float) array -> (float * float) array

gaussian sigma data applies Gaussian kernel smoothing. sigma controls the smoothing width; the kernel radius is ceil(3 × sigma). Returns data unchanged if sigma <= 0.