joshday / OnlineStats.jl

⚡ Single-pass algorithms for statistics
https://joshday.github.io/OnlineStats.jl/latest/
MIT License
831 stars 62 forks source link

when fit!-ing a Group to a NamedTuple, the names are ignored #278

Open schlichtanders opened 6 months ago

schlichtanders commented 6 months ago
using OnlineStats
o = Group(hi = Mean(), b = Counter())
fit!(o, [(b = 5, hi = 1)])

returns

Group
├─ Mean: n=1 | value=5.0
└─ Counter: n=1 | value=1

This is very confusing. If names are given on both sides, on definition of the Monoid and on the data, then it is at least for me intuitive if the data would be matched to the aggregators by names.

joshday commented 6 months ago

fit!-ing is based on iteration: https://joshday.github.io/OnlineStats.jl/latest/howfitworks/

This is a good "OnlineStats 2.0" feature, but probably too much of a breaking change for now.

schlichtanders commented 6 months ago

I guess the breaking part is that currently using entirely different keys still works.