Versions in this module Expand all Collapse all v1 v1.1.2 Jan 29, 2026 v1.1.1 Jan 29, 2026 v1.1.0 Jan 29, 2026 Changes in this version + type AggregateFunc func(values []float64) float64 + var Count AggregateFunc = func(values []float64) float64 { ... } + var Max AggregateFunc = func(values []float64) float64 { ... } + var Mean AggregateFunc = func(values []float64) float64 { ... } + var Median AggregateFunc = func(values []float64) float64 { ... } + var Min AggregateFunc = func(values []float64) float64 { ... } + var Sum AggregateFunc = func(values []float64) float64 { ... } + type BinOptions struct + Count int + Domain [2]float64 + Nice bool + Thresholds []float64 + type DataPoint struct + Count int + Data interface{} + Group string + Index int + Label string + Value float64 + X interface{} + Y float64 + Y0 float64 + Y1 float64 + func ToDataPoints(points []TimeSeriesPoint) []DataPoint + type EWM struct + func NewEWM(alpha float64) *EWM + func (ewm *EWM) Adjust(adjust bool) *EWM + func (ewm *EWM) IgnoreNA(ignore bool) *EWM + func (ewm *EWM) Mean() Transform + func (ewm *EWM) MinPeriods(n int) *EWM + func (ewm *EWM) Std() Transform + func (ewm *EWM) Var() Transform + type Expanding struct + func NewExpanding() *Expanding + func (e *Expanding) Apply(fn AggregateFunc) Transform + func (e *Expanding) Count() Transform + func (e *Expanding) Max() Transform + func (e *Expanding) Mean() Transform + func (e *Expanding) Min() Transform + func (e *Expanding) MinPeriods(n int) *Expanding + func (e *Expanding) Std() Transform + func (e *Expanding) Sum() Transform + func (e *Expanding) Var() Transform + type GroupOptions struct + Aggregate AggregateFunc + By string + Sort string + type HoppingWindow struct + Hop int + Size int + func NewHoppingWindow(size, hop int) *HoppingWindow + func (hw *HoppingWindow) WindowBounds(windowID int, data []DataPoint) (start, end int) + func (hw *HoppingWindow) Windows(data []DataPoint) [][]int + type NormalizeOptions struct + By string + Method string + type Rolling struct + func NewRolling(window int) *Rolling + func (r *Rolling) Apply(fn AggregateFunc) Transform + func (r *Rolling) Center(center bool) *Rolling + func (r *Rolling) Kurt() Transform + func (r *Rolling) Max() Transform + func (r *Rolling) Mean() Transform + func (r *Rolling) Median() Transform + func (r *Rolling) Min() Transform + func (r *Rolling) MinPeriods(n int) *Rolling + func (r *Rolling) Quantile(q float64) Transform + func (r *Rolling) Skew() Transform + func (r *Rolling) Std() Transform + func (r *Rolling) Sum() Transform + func (r *Rolling) Var() Transform + type SessionWindow struct + GapThreshold time.Duration + func NewSessionWindow(gapThreshold time.Duration) *SessionWindow + func (sw *SessionWindow) WindowBounds(windowID int, data []DataPoint) (start, end int) + func (sw *SessionWindow) Windows(data []DataPoint) [][]int + type SlidingWindow struct + Size int + Step int + func NewSlidingWindow(size int) *SlidingWindow + func (sw *SlidingWindow) WindowBounds(windowID int, data []DataPoint) (start, end int) + func (sw *SlidingWindow) Windows(data []DataPoint) [][]int + func (sw *SlidingWindow) WithStep(step int) *SlidingWindow + type SmoothOptions struct + Alpha float64 + Bandwidth float64 + Method string + WindowSize int + type SnapshotWindow struct + func NewSnapshotWindow() *SnapshotWindow + func (sw *SnapshotWindow) WindowBounds(windowID int, data []DataPoint) (start, end int) + func (sw *SnapshotWindow) Windows(data []DataPoint) [][]int + type StackOptions struct + By string + Offset string + Order string + type TimeSeriesPoint struct + Label string + Time time.Time + Value float64 + func FromDataPoints(points []DataPoint) []TimeSeriesPoint + type TimeWindow struct + Interval time.Duration + func NewTimeWindow(interval time.Duration) *TimeWindow + func (tw *TimeWindow) WindowBounds(windowID int, data []DataPoint) (start, end int) + func (tw *TimeWindow) Windows(data []DataPoint) [][]int + type Transform func([]DataPoint) []DataPoint + func Abs() Transform + func ApplyWindow(strategy WindowStrategy, fn AggregateFunc) Transform + func Bin(opts BinOptions) Transform + func BinCount(binSize float64) Transform + func Clamp(min, max float64) Transform + func Cumulative() Transform + func Dodge(by string, padding float64) Transform + func Downsample(n int) Transform + func Expand() Transform + func ExponentialSmoothing(alpha float64) Transform + func Filter(predicate func(DataPoint) bool) Transform + func GroupBy(opts GroupOptions) Transform + func Histogram(thresholds ...float64) Transform + func Interpolate() Transform + func Loess(bandwidth float64) Transform + func Log(base float64) Transform + func Map(fn func(DataPoint) DataPoint) Transform + func MovingAverage(windowSize int) Transform + func Normalize(opts NormalizeOptions) Transform + func NormalizeByGroup(groupBy string, method string) Transform + func NormalizeFraction() Transform + func NormalizeMinMax(targetMin, targetMax float64) Transform + func NormalizePercentage() Transform + func NormalizeZScore() Transform + func Offset(amount float64) Transform + func Percentile(p float64) Transform + func Reduce(fn AggregateFunc) Transform + func SavitzkyGolay(windowSize, polyOrder int) Transform + func Scale(factor float64) Transform + func Smooth(opts SmoothOptions) Transform + func SnapshotAggregate(fn AggregateFunc) Transform + func SnapshotCount() Transform + func SnapshotMax() Transform + func SnapshotMean() Transform + func SnapshotMin() Transform + func SnapshotSum() Transform + func Sort(by string, ascending bool) Transform + func Sqrt() Transform + func Stack(opts StackOptions) Transform + func StackCenter(by string) Transform + func StackNormalize(by string) Transform + func StackZero(by string) Transform + func Top(n int) Transform + func Unstack() Transform + func WeightedMovingAverage(weights []float64) Transform + func Window(size int, fn AggregateFunc) Transform + func WindowAggregate(size int, fn AggregateFunc, strategy string) Transform + func WindowedMax(size int, strategy string) Transform + func WindowedMean(size int, strategy string) Transform + func WindowedMin(size int, strategy string) Transform + func WindowedSum(size int, strategy string) Transform + type TumblingWindow struct + Size int + func NewTumblingWindow(size int) *TumblingWindow + func (tw *TumblingWindow) WindowBounds(windowID int, data []DataPoint) (start, end int) + func (tw *TumblingWindow) Windows(data []DataPoint) [][]int + type WindowStrategy interface + WindowBounds func(windowID int, data []DataPoint) (start, end int) + Windows func(data []DataPoint) [][]int