Created
August 9, 2012 19:30
-
-
Save phobson/3307341 to your computer and use it in GitHub Desktop.
acceleration
This file contains hidden or 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 | |
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