Comments (7)
Actually is there a bug here? https://github.com/joshday/OnlineStats.jl/blob/master/src/summary.jl#L65
from onlinestats.jl.
It works ok for EqualWeight but ExponentialWeight is completely wrong.
from onlinestats.jl.
Here's a simple example:
julia> x = randn(100);
julia> var(x)
1.162888972180564
julia> v = Variance()
▌ Variance
▶ value: -0.0
▶ nobs: 0
julia> fit!(v, x); v
▌ Variance
▶ value: 1.1628889721805642
▶ nobs: 100
julia> v = Variance(ExponentialWeight(10))
▌ Variance
▶ value: -0.0
▶ nobs: 0
julia> fit!(v, x); v
▌ Variance
▶ value: -1.976802951354775e189
▶ nobs: 100
from onlinestats.jl.
That is quite the bug! I'll take a look.
from onlinestats.jl.
var(o::Variance)
now behaves a bit better:
julia> xvar = Float64[(fit!(v, xi); std(v)) for xi in x]
100-element Array{Float64,1}:
0.0
0.03677
0.265324
0.537096
...
In my rewrite, I apparently missed a method for ExponentialWeight(minstep::Integer)
, so your example was using a nonsensical weight of 10 for each update. This has been fixed.
julia> x = randn(100);
julia> v = Variance(ExponentialWeight(20));
julia> fit!(v, x); v
▌ Variance
▶ value: 0.9294099372585689
▶ nobs: 100
The line you pointed out comes straight from Knuth's Art of Computer Programming, but I'm not sure it's correct for non-EqualWeight updates. I'll leave this open while I look into it.
from onlinestats.jl.
http://www-uxsup.csx.cam.ac.uk/~fanf2/hermes/doc/antiforgery/stats.pdf confirms the update is the same for ExponentialWeight (see equation 142, equation 143 has a typo).
from onlinestats.jl.
Great thanks for following up!
On Sat, Feb 13, 2016 at 3:42 PM, Josh Day [email protected] wrote:
—
Reply to this email directly or view it on GitHub
#51 (comment).
from onlinestats.jl.
Related Issues (20)
- MovingWindow raises a BoundsError HOT 2
- Possible type instability in `OnlineStatsBase.jl` HOT 1
- Group with 3 Stats not working for multi-observations? HOT 3
- Julia VS Code extension reports "Possible method call error" for `fit!` HOT 3
- _fit! on AutoCov is not type stable HOT 1
- Extract field of an observation before feeding an OnlineStats - ValueExtractor wrapper HOT 2
- Feature Request: OnlineStat Chaining HOT 1
- Using StatLag without depending on OnlineStats (just OnlineStatsBase) HOT 4
- ExtremeValues doesn't work HOT 2
- Odd interaction of `Group` with broadcast HOT 2
- [speculative] `NullStat` HOT 1
- Plot of GroupBy of HeatMap fails HOT 1
- when fit!-ing a Group to a NamedTuple, the names are ignored HOT 2
- Documentation Request: List which Monoids support merge HOT 1
- Feature Request: PCA wrapper around CovMatrix which also supports transform methods
- Pretty printing is unpretty inside DataFrame HOT 1
- Support `keys` and `values` on `GroupBy` HOT 1
- Bug: Y-Marginals for heatmap are wrong HOT 1
- Allow counts argument in `fit!` HOT 5
- Suggestions for OnlineStats v2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onlinestats.jl.