Skip to content

Instantly share code, notes, and snippets.

@phobson
Created August 9, 2012 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phobson/3307341 to your computer and use it in GitHub Desktop.
Save phobson/3307341 to your computer and use it in GitHub Desktop.
acceleration
import numpy as np
def acceleration(data):
SSD = np.sum((data.mean() - data)**3)
SCD = np.sum((data.mean() - data)**2)
# catch to make sure SCD isn't zero
if SCD == 0.0:
SCD = 1e-12
acc = SSD / (6 * SCD**1.5)
return acc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment