You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beyond basic arithmetic (#153), workflows over numeric sequences commonly need summary statistics. We already have Sum and (proposed) Mean/Min/Max; this adds the rest. Python's stdlib statistics module covers most of these directly.
Proposed nodes
All take a single SequenceValue[FloatValue] input and output a FloatValue unless noted.
Median — middle value; for even-length sequences, define interpolation (recommend statistics.median, i.e. mean of the two middle values).
Mode — most common value. Define tie behavior (statistics.mode raises on no unique mode in older Pythons; multimode returns all — pick one and document).
Variance — with a population (bool) param: sample (statistics.variance, n-1) vs population (pvariance, n). Default to one and document.
StandardDeviation — same population param (stdev / pstdev).
Range — max - min → FloatValue.
Percentile / Quantile — a q param (0–100 or 0–1); define interpolation method (statistics.quantiles or numpy-style).
Count / Length — number of elements → IntegerValue. (Overlaps with a generic sequence Length; see the sequence-utilities issue — decide whether stats reuses that or has its own.)
Motivation
Beyond basic arithmetic (#153), workflows over numeric sequences commonly need summary statistics. We already have
Sumand (proposed)Mean/Min/Max; this adds the rest. Python's stdlibstatisticsmodule covers most of these directly.Proposed nodes
All take a single
SequenceValue[FloatValue]input and output aFloatValueunless noted.Median— middle value; for even-length sequences, define interpolation (recommendstatistics.median, i.e. mean of the two middle values).Mode— most common value. Define tie behavior (statistics.moderaises on no unique mode in older Pythons;multimodereturns all — pick one and document).Variance— with apopulation(bool) param: sample (statistics.variance, n-1) vs population (pvariance, n). Default to one and document.StandardDeviation— samepopulationparam (stdev/pstdev).Range—max - min→FloatValue.Percentile/Quantile— aqparam (0–100 or 0–1); define interpolation method (statistics.quantilesor numpy-style).Count/Length— number of elements →IntegerValue. (Overlaps with a generic sequenceLength; see the sequence-utilities issue — decide whether stats reuses that or has its own.)Conventions / decisions
NodeException(consistent with the decision in Add more built-in arithmetic nodes #153 forMin/Max/Mean).FloatValuein/out; Integer→Float casts already handle integer sources.title/description; auto-derivedtype;version1.0.0.Related