Mercurial > hg > nsaunier > traffic-intelligence
comparison python/ml.py @ 563:39de5c532559
place holder functions
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Sat, 19 Jul 2014 23:44:39 -0400 |
| parents | 21bdeb29f855 |
| children | 3058e00887bc |
comparison
equal
deleted
inserted
replaced
| 562:259ccb3dd962 | 563:39de5c532559 |
|---|---|
| 105 from scipy.cluster.vq import kmeans, whiten, vq | 105 from scipy.cluster.vq import kmeans, whiten, vq |
| 106 features = whiten(features) | 106 features = whiten(features) |
| 107 centroids,distortion = kmeans(features,k, iter) | 107 centroids,distortion = kmeans(features,k, iter) |
| 108 code,distance = vq(features,centroids) # code starting from 0 (represent first cluster) to k-1 (last cluster) | 108 code,distance = vq(features,centroids) # code starting from 0 (represent first cluster) to k-1 (last cluster) |
| 109 return code,sigma | 109 return code,sigma |
| 110 | |
| 111 def motionPatterLearning(objects, maxDistance): | |
| 112 ''' | |
| 113 Option to use only the (n?) longest features per object instead of all for speed up | |
| 114 TODO''' | |
| 115 pass | |
| 116 | |
| 117 def prototypeCluster(): | |
| 118 ''' | |
| 119 TODO''' | |
| 120 pass |
