Skip to content

Instantly share code, notes, and snippets.

@dbuscombe-usgs
Created June 8, 2014 22:24
Show Gist options
  • Save dbuscombe-usgs/9c12f08fea9b42073345 to your computer and use it in GitHub Desktop.
Save dbuscombe-usgs/9c12f08fea9b42073345 to your computer and use it in GitHub Desktop.
simple implementation of runningstats class
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