online-series
Stack multiple stats one by one in Series. Get all results in an object. Instead of dealing with each stat separately, you can create a Series object, then call it once for each data observation. Another benefit is that all stats have a common result object. So it can help optimize calculation in the future.
Instead of:
const Mean = const Variance = const mean = const variance = ;123 results = mean: meanvalue variance: variancevalue
You can use Series:
const Mean = const Variance = const Series = const s = ;123 result = svalues
To create a Series
object, call Series() with initialized Stats objects (for example Mean()
)
Then use it as you use mean, variance, min, max etc
The only difference is its output. Insted if a scalar value it returns an object with corresponding keys: mean, median, min, max etc...
Available getter is ***.values
.
To change how results are called pass a list of object to Series():
const s =
The s
output object will have such keys: Average, Variance, ...
Initialize Series() in such way if you use code minifiers!!!
You can add Groups inside Series:
const s =