Mercurial Hosting > traffic-intelligence
comparison scripts/learn-poi.py @ 927:c030f735c594
added assignment of trajectories to prototypes and cleanup of insert queries
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 11 Jul 2017 17:56:23 -0400 |
parents | 7345f0d51faa |
children | 933670761a57 |
comparison
equal
deleted
inserted
replaced
926:dbd81710d515 | 927:c030f735c594 |
---|---|
63 ml.plotGMMClusters(models[gmmType], labels, points, fig, nUnitsPerPixel = args.unitsPerPixel) | 63 ml.plotGMMClusters(models[gmmType], labels, points, fig, nUnitsPerPixel = args.unitsPerPixel) |
64 plt.axis('image') | 64 plt.axis('image') |
65 plt.title(gmmType) | 65 plt.title(gmmType) |
66 print(gmmType+' Clusters:\n{}'.format(ml.computeClusterSizes(labels, range(models[gmmType].n_components)))) | 66 print(gmmType+' Clusters:\n{}'.format(ml.computeClusterSizes(labels, range(models[gmmType].n_components)))) |
67 # save | 67 # save |
68 storage.savePOIs(args.databaseFilename, models[gmmType], gmmType, gmmId) | 68 storage.savePOIsToSqlite(args.databaseFilename, models[gmmType], gmmType, gmmId) |
69 # save assignments | 69 # save assignments |
70 if args.assign: | 70 if args.assign: |
71 for o, l in zip(objects, labels): | 71 for o, l in zip(objects, labels): |
72 if gmmType == 'beginning': | 72 if gmmType == 'beginning': |
73 o.od[0] = l | 73 o.od[0] = l |