Comments (3)
Hmm, there's an error with the multi-observation method, since this appears to work:
julia> fit!(g, data[1])
Group
├─ HeatMap: n=1 | value=(x = 0:10, y = -5:5, z = [0 0 … 0 0; 0 0 … 0 0; … ; 0 0 … 0 0; 0 0 … 0 0])
├─ Hist: n=1 | value=(x = 0:10, y = [0, 0, 0, 1, 0, 0, 0, 0, 0, 0])
└─ Hist: n=1 | value=(x = -5:5, y = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
from onlinestats.jl.
Thanks, I changed the title. Then a more or less elegant workaround is
julia> fit!!(g, it) = foreach(x -> fit!(g, x), it)
fit!! (generic function with 1 method)
julia> fit!!(g, data); g
Group
├─ HeatMap: n=2 | value=(x = 0:10, y = -5:5, z = [0 0 … 0 0; 0 0 … 0 0; … ; 0 0 … 0 0; 0 0 … 0 0])
├─ Hist: n=2 | value=(x = 0:10, y = [0, 0, 0, 1, 0, 0, 0, 1, 0, 0])
└─ Hist: n=2 | value=(x = -5:5, y = [0, 0, 0, 1, 0, 0, 0, 0, 0, 1])
from onlinestats.jl.
For reference, closer to my real application is
julia> xydata(n) = ((5+randn(), randn()) for x in 1:n)
xydata (generic function with 1 method)
julia> g=Group(HeatMap(0.0:10, -5.0:5), Hist(0.0:10), Hist(-5.0:5))
Group
├─ HeatMap: n=0 | value=(x = 0.0:1.0:10.0, y = -5.0:1.0:5.0, z = [0 0 … 0 0; 0 0 … 0 0; … ; 0 0 … 0 0; 0 0 … 0 0])
├─ Hist: n=0 | value=(x = 0.0:1.0:10.0, y = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
└─ Hist: n=0 | value=(x = -5.0:1.0:5.0, y = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
julia> fit!!(g, it) = foreach(x -> fit!(g, x), it)
fit!! (generic function with 1 method)
julia> fit!!(g, map(z -> (z, z[1], z[2]), xydata(5_000_000))); g
Group
├─ HeatMap: n=5_000_000 | value=(x = 0.0:1.0:10.0, y = -5.0:1.0:5.0, z = [0 0 … 1 0; 0 10 … 6 0; … ; 0 16 … 7 1; 0 0 … 0 0])
├─ Hist: n=5_000_000 | value=(x = 0.0:1.0:10.0, y = [151, 6528, 106846, 679123, 1705893, 1707704, 680233, 106767, 6608, 146])
└─ Hist: n=5_000_000 | value=(x = -5.0:1.0:5.0, y = [151, 6644, 106620, 679893, 1707789, 1704820, 680415, 106955, 6552, 158])
It seems a very fast method for putting a large number of x-y data into both a heatmap and histograms of x and y.
from onlinestats.jl.
Related Issues (20)
- Possible type instability in `OnlineStatsBase.jl` HOT 1
- 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 5
- 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
- Standard Deviation - StdDev 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.