Mercurial Hosting > traffic-intelligence
diff samples/performances.txt @ 730:a850a4f92735 dev
added performance script comparing lcss using cdist with default
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 11 Aug 2015 10:52:04 -0400 |
parents | d6c69d3d09e5 |
children |
line wrap: on
line diff
--- a/samples/performances.txt Mon Aug 10 17:52:19 2015 -0400 +++ b/samples/performances.txt Tue Aug 11 10:52:04 2015 -0400 @@ -1,3 +1,9 @@ +python -m timeit 'from utils import LCSS; from numpy.random import random_sample; lcss = LCSS(metric = "cityblock", epsilon = 0.1); lcss.compute(random_sample((1000,2)), random_sample((2000, 2)))' +10 loops, best of 3: 1.6 sec per loop + +python -m timeit 'from utils import LCSS; from numpy.random import random_sample; lcss = LCSS(similarityFunc = lambda x,y: (abs(x[0]-y[0]) <= 0.1) and (abs(x[1]-y[1]) <= 0.1)); lcss.compute(random_sample((1000,2)), random_sample((2000, 2)))' +10 loops, best of 3: 3.48 sec per loop +######## Performance report using ../../Data/norway/2_video/20130606-0830.sqlite #### test query positions