Raxol. Adaptive. TrendDetector
(Raxol v2.6.0)
View Source
Pure functional trend detection across aggregate windows.
Computes per-pane slopes for dwell, command, and scroll metrics over the last N aggregates. Returns a map of pane_id to trend data.
No GenServer -- call from LayoutRecommender before applying rules.
Summary
Functions
Compute per-pane trends from a list of aggregates (newest first).
Check if a pane's dwell is trending upward despite currently being low.
Types
Functions
Compute per-pane trends from a list of aggregates (newest first).
Returns %{pane_id => %{dwell_trend: slope, command_trend: slope, scroll_trend: slope}}.
Slopes are per-window change rates. Positive = increasing, negative = decreasing.
Requires at least 2 aggregates; returns empty map otherwise.
Check if a pane's dwell is trending upward despite currently being low.
Useful for suppressing hide recommendations on panes gaining importance.