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

Multiple statistics with multiple variables #234

Open
Moelf opened this issue Aug 27, 2021 · 4 comments
Open

Multiple statistics with multiple variables #234

Moelf opened this issue Aug 27, 2021 · 4 comments

Comments

@Moelf
Copy link

Moelf commented Aug 27, 2021

I know fit!() works with an iterator, but what if I need to return multiple pairs of (value, weight) from the iterator because I want to make many weighted histograms in one pass of the data?

@joshday
Copy link
Owner

joshday commented Aug 27, 2021

Can you clarify a bit? I don't think I follow.

@Moelf
Copy link
Author

Moelf commented Aug 27, 2021

taking this example from docs:

itr = (row.variety => parse(Float64, row.sepal_length) for row in rows)

o = GroupBy(String, Hist(4:0.25:8))

fit!(o, itr)

What if:

  1. each observation from itr has a weight (histogram filling weight)
  2. Each Histogram has different binning (say "Setosa" has 4:0.5:8, and "Virginica" has 6:0.25:8)

@joshday
Copy link
Owner

joshday commented Aug 28, 2021

You may have to roll a few things on your own.

Also, I've been meaning to work on StatsBase-like weights for OnlineStats so maybe this will nudge me to do it.

@Moelf
Copy link
Author

Moelf commented Aug 28, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants