granite-0.7.4.0: Easy terminal plotting.
Copyright(c) 2025
LicenseMIT
Maintainermschavinda@gmail.com
Safe HaskellNone
LanguageGHC2021

Granite.Stat

Description

Statistical transforms (Stat). Each runs on a layer's mapped X / Y columns and returns a new frame, generally with the same column names holding the transformed values. StatBoxplot additionally writes __ymin __q1 __median __q3 __ymax for the boxplot geom to read.

Synopsis

Documentation

kdeData :: Int -> [Double] -> ([Double], [Double]) Source #

Gaussian KDE on n grid points; bandwidth is Silverman's rule.

smoothLm :: [Double] -> [Double] -> [Double] Source #

OLS regression, evaluated at the input X positions.

smoothMovingAvg :: Int -> [Double] -> [Double] Source #

Trailing moving average; leading edge is the partial-window mean so the output length matches the input.

smoothLoess :: Double -> [Double] -> [Double] -> [Double] Source #

LOESS-style local linear regression with tricube weights; span_ is the neighbourhood fraction in (0, 1].

boxplotSummary :: [Double] -> BoxStats Source #

Five-number summary using Tukey hinges: when n is odd the median is included in both halves, so boxplotSummary [1..9] gives (1, 3, 5, 7, 9).

data BoxStats Source #

Constructors

BoxStats 

Fields

Instances

Instances details
Show BoxStats Source # 
Instance details

Defined in Granite.Stat

Eq BoxStats Source # 
Instance details

Defined in Granite.Stat