Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add examples of using OnlineStats #39

Open
jpsamaroo opened this issue Aug 8, 2023 · 0 comments
Open

docs: Add examples of using OnlineStats #39

jpsamaroo opened this issue Aug 8, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@jpsamaroo
Copy link
Member

Add one or more examples to the docs of how to use OnlineStats with DTables, such as in joshday/OnlineStatsBase.jl#26 (comment):

julia> fun = fit!
fit! (generic function with 4 methods)

julia> v = [reduce(fun, [1,2,3], init=Mean()) for _ in 1:3]
3-element Vector{Mean{Float64, EqualWeight}}:
 Mean: n=3 | value=2.0
 Mean: n=3 | value=2.0
 Mean: n=3 | value=2.0

julia> reduce(fun, v, init=Mean())
Mean: n=9 | value=2.0

But where instead of [1,2,3], we pass in a DTable and specify cols as the columns we want to reduce over.

@jpsamaroo jpsamaroo added documentation Improvements or additions to documentation good first issue Good for newcomers labels Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant