Mercurial Hosting > traffic-intelligence
changeset 379:f1a1923ddff9
minor
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Fri, 19 Jul 2013 00:37:02 -0400 |
parents | 3805b9639647 |
children | adfd4f70ee1d |
files | python/moving.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/python/moving.py Thu Jul 18 21:55:17 2013 -0400 +++ b/python/moving.py Fri Jul 19 00:37:02 2013 -0400 @@ -713,11 +713,12 @@ from scipy.stats import scoreatpercentile speeds = framerate*self.getSpeeds() coef = utils.linearRegression(range(len(speeds)), speeds) - print(min(speeds), scoreatpercentile(speeds, 5), speeds[-2]-speeds[1], std(speeds), coef[0]) + print('min/5th perc speed: {} / {}\nspeed diff: {}\nspeed stdev: {}\nregression: {}'.format(min(speeds), scoreatpercentile(speeds, 5), speeds[-2]-speeds[1], std(speeds), coef[0])) if display: - from matplotlib.pyplot import figure, plot + from matplotlib.pyplot import figure, plot, axis figure(1) self.draw() + axis('equal') figure(2) plot(list(self.getTimeInterval()), speeds)