Mercurial > hg > nsaunier > traffic-intelligence
diff python/tests/storage.txt @ 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 | 3a06007a4bb7 |
| children | 933670761a57 |
line wrap: on
line diff
--- a/python/tests/storage.txt Mon Jul 10 18:04:41 2017 -0400 +++ b/python/tests/storage.txt Tue Jul 11 17:56:23 2017 -0400 @@ -6,9 +6,6 @@ File non_existant_file.txt could not be opened. >>> nonexistentFilename = "nonexistent" ->>> loadPrototypeMatchIndexesFromSqlite(nonexistentFilename) -DB Error: no such table: prototypes -[] >>> loadTrajectoriesFromSqlite(nonexistentFilename, 'feature') DB Error: no such table: positions DB Error: no such table: velocities @@ -122,8 +119,8 @@ >>> gmm = GaussianMixture(4, covariance_type = 'full') >>> tmp = gmm.fit(points) >>> gmmId = 0 ->>> savePOIs('pois-tmp.sqlite', gmm, 'end', gmmId) ->>> reloadedGmm = loadPOIs('pois-tmp.sqlite') +>>> savePOIsToSqlite('pois-tmp.sqlite', gmm, 'end', gmmId) +>>> reloadedGmm = loadPOIsFromSqlite('pois-tmp.sqlite') >>> sum(gmm.predict(points) == reloadedGmm[gmmId].predict(points)) == nPoints True >>> reloadedGmm[gmmId].gmmTypes[0] == 'end'
