cxxr / livestats Goto Github PK
View Code? Open in Web Editor NEWOnline Statistical Algorithms for Python
License: Other
Online Statistical Algorithms for Python
License: Other
Apache Commons Math Stats supports setting a window size for rolling stats. Is there a way to set the window size in LiveStats?
The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.
[1, 5, 6, 7, 9, 12, 15, 19, 20]
for this set LiveStats shows me 8.68209876543
but this is not a median for this values! It's not just not-accurate - this just not a median. Just becouse median must split set to 2 parts with same length, this value wrong.
Any ideas why this happened and how to solve this?
Try out this simple code which gives 10 values in [60-61) and then keeps giving values only between [50-51)
After 100 total samples, we expect theoretically that the percentile value will be around in (50-51). The As P^2 is just an estimate, I break out of the loop once we get a value of less than 52. Now this takes anywhere from 5000 samples forever.
Try running this simple code multiple times and see..
from livestats import livestats
from math import sqrt
import random
low = 50
high = 50*1.2
randomdata = iter(random.random, 1)
test = livestats.LiveStats([0.99])
count = 0;
for count in xrange(10):
test.add(randomdata.next() + high)
for count in xrange(50000000):
test.add(low)
if(count%100 == 0):
print "count {}: Average {}, stddev {}, quantiles {}".format(count, test.mean(), sqrt(test.variance()), test.quantiles())
if(test.quantiles()[0][1] < low+2):
break;
print "Done: count {}: Average {}, stddev {}, quantiles {}".format(count, test.mean(), sqrt(test.variance()), test.quantiles())
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.