OnlineStats.jl
OnlineStats.jl copied to clipboard
Can "fit!" accept a Weight variable per Observation?
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.
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.