Created
June 8, 2014 22:24
-
-
Save dbuscombe-usgs/9c12f08fea9b42073345 to your computer and use it in GitHub Desktop.
simple implementation of runningstats class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# generate some data | |
x = np.random.rand(1000,1) | |
# get the class | |
import RunningStats | |
# get an instance of the class | |
rs = RunningStats.RunningStats() | |
# global stats | |
for k in x: | |
rs.Push(k[0]) | |
print rs.Variance() | |
print rs.Mean() | |
print rs.Kurtosis() | |
print rs.Skewness() | |
print rs.StandardDeviation() | |
rs.Clear() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment