Mercurial Hosting > traffic-intelligence
comparison python/indicators.py @ 631:2d1d33ae1c69
major work on pPET and pet, issues remain for pPET computed with predicted trajectories
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 17 Feb 2015 03:55:55 +0100 |
parents | eb8baa080470 |
children | 3058e00887bc |
comparison
equal
deleted
inserted
replaced
630:69a98f84f3eb | 631:2d1d33ae1c69 |
---|---|
139 | 139 |
140 def __init__(self, name, values, timeInterval=None, mostSevereIsMax=True, maxValue = None): | 140 def __init__(self, name, values, timeInterval=None, mostSevereIsMax=True, maxValue = None): |
141 TemporalIndicator.__init__(self, name, values, timeInterval, maxValue) | 141 TemporalIndicator.__init__(self, name, values, timeInterval, maxValue) |
142 self.mostSevereIsMax = mostSevereIsMax | 142 self.mostSevereIsMax = mostSevereIsMax |
143 | 143 |
144 def getMostSevereValue(self, minNInstants=1): # TODO use scoreatpercentile | 144 def getMostSevereValue(self, minNInstants=1): # TODO use np.percentile |
145 from matplotlib.mlab import find | 145 from matplotlib.mlab import find |
146 from numpy.core.multiarray import array | 146 from numpy.core.multiarray import array |
147 from numpy.core.fromnumeric import mean | 147 from numpy.core.fromnumeric import mean |
148 values = array(self.values.values()) | 148 values = array(self.values.values()) |
149 indices = range(len(values)) | 149 indices = range(len(values)) |