Mercurial Hosting > traffic-intelligence
diff scripts/classify-objects.py @ 687:de278c5e65f6 dev
minor comments for lognormal parameters (numpy and usual names differ)
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Mon, 22 Jun 2015 15:27:33 +0200 |
parents | cdee6a3a47b4 |
children | 5b970a5bc233 |
line wrap: on
line diff
--- a/scripts/classify-objects.py Tue Jun 09 17:29:03 2015 +0200 +++ b/scripts/classify-objects.py Mon Jun 22 15:27:33 2015 +0200 @@ -52,7 +52,7 @@ # log logistic for ped and bik otherwise ((pedBeta/pedAlfa)*((sMean/pedAlfa)**(pedBeta-1)))/((1+(sMean/pedAlfa)**pedBeta)**2.) speedProbabilities = {'car': lambda s: norm(params.meanVehicleSpeed, params.stdVehicleSpeed).pdf(s), 'pedestrian': lambda s: norm(params.meanPedestrianSpeed, params.stdPedestrianSpeed).pdf(s), - 'bicycle': lambda s: lognorm(params.scaleCyclistSpeed, loc = 0., scale = np.exp(params.locationCyclistSpeed)).pdf(s)} # lognorm shape, loc, scale + 'bicycle': lambda s: lognorm(params.scaleCyclistSpeed, loc = 0., scale = np.exp(params.locationCyclistSpeed)).pdf(s)} # numpy lognorm shape, loc, scale: shape for numpy is scale (std of the normal) and scale for numpy is location (mean of the normal) if args.plotSpeedDistribution: import matplotlib.pyplot as plt