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

Can "fit!" accept a Weight variable per Observation? #164

Open
evveric opened this issue Nov 18, 2019 · 1 comment
Open

Can "fit!" accept a Weight variable per Observation? #164

evveric opened this issue Nov 18, 2019 · 1 comment

Comments

@evveric
Copy link

evveric commented Nov 18, 2019

Let's say I have a "Mean()" object.

I can fit!(o, 1), but If I want to say, this observation has weight = 150%, or only 10%, --> this is not doable right?

FYI, right now I force my program to only have "Integer Custom weight per Observation"

If I see this 1 variable has weight = 200%, I will call fit!(o, 1) Two times,
then by definition, it will double the weight of 1 in the final Mean.

But this is a dirty solution. Is there a generic way to add the "Weight" per observation to all fit! function?

Thank you.

@joshday
Copy link
Owner

joshday commented Nov 18, 2019

Not built into OnlineStats (yet). I have some ideas but I never came up with an interface I liked. The complexity lies with multiple types of weighting (e.g. 1) statistical weighting like you are discussing here and 2) OnlineStats' weighting of EqualWeight, ExponentialWeight, etc.).

I think https://github.com/gdkrmr/WeightedOnlineStats.jl has what you are looking for.

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