Mercurial > hg > nsaunier > traffic-intelligence
comparison trafficintelligence/tests/storage.txt @ 1287:76f5693b530c
updated tests for numpy 2
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Sat, 20 Jul 2024 20:35:21 -0400 |
| parents | 4356065ed3ca |
| children |
comparison
equal
deleted
inserted
replaced
| 1284:8e30c9a6ac6f | 1287:76f5693b530c |
|---|---|
| 120 >>> gmm = GaussianMixture(n_components = 4, covariance_type = 'full') | 120 >>> gmm = GaussianMixture(n_components = 4, covariance_type = 'full') |
| 121 >>> tmp = gmm.fit(points) | 121 >>> tmp = gmm.fit(points) |
| 122 >>> gmmId = 0 | 122 >>> gmmId = 0 |
| 123 >>> savePOIsToSqlite('pois-tmp.sqlite', gmm, 'end', gmmId) | 123 >>> savePOIsToSqlite('pois-tmp.sqlite', gmm, 'end', gmmId) |
| 124 >>> reloadedGmm = loadPOIsFromSqlite('pois-tmp.sqlite') | 124 >>> reloadedGmm = loadPOIsFromSqlite('pois-tmp.sqlite') |
| 125 >>> sum(gmm.predict(points) == reloadedGmm[gmmId].predict(points)) == nPoints | 125 >>> int(sum(gmm.predict(points) == reloadedGmm[gmmId].predict(points))) == nPoints |
| 126 True | 126 True |
| 127 >>> reloadedGmm[gmmId].gmmTypes[0] == 'end' | 127 >>> reloadedGmm[gmmId].gmmTypes[0] == 'end' |
| 128 True | 128 True |
| 129 >>> remove('pois-tmp.sqlite') | 129 >>> remove('pois-tmp.sqlite') |
