|
|
# Mean Shift Clustering
|
|
|
|
|
|
A fast implementation of mean-shift clustering using dual-tree range search. Given a dataset, this uses the mean shift algorithm to produce and return a clustering of the data.
|
|
|
|
|
|
# Available Predicates
|
|
|
|
|
|
* [meanShift/12](/PrologMethods/Clustering/mean_shift#meanshift12)
|
|
|
|
|
|
---
|
|
|
|
|
|
[links/resources](/PrologMethods/Clustering/mean_shift#connected-linksresources)
|
|
|
|
|
|
## **_meanShift/12_**
|
|
|
|
|
|
Perform mean shift clustering on the data, returning a list of cluster assignments and centroids.
|
|
|
|
|
|
```prolog
|
|
|
%% part of the predicate definition
|
|
|
meanShift( +float32, +integer,
|
|
|
+pointer(float_array), +integer, +integer,
|
|
|
-pointer(float_array), -integer,
|
|
|
-pointer(float_array), -integer, -integer,
|
|
|
+integer, +integer).
|
|
|
```
|
|
|
|
|
|
### Parameters
|
|
|
| Name | Type | Description | Default |
|
|
|
|------|------|-------------|---------|
|
|
|
| radius | +float | If distance of two centroids is less than it, one will be removed. If this value isn't positive, an estimation will be given when clustering. | 0.0 |
|
|
|
| maxIterations | +integer | Maximum number of iterations allowed before giving up iterations will terminate. | 1000 |
|
|
|
| data | +matrix | Dataset to cluster. | - |
|
|
|
| assignments | -vector | Vector to store cluster assignments in. | - |
|
|
|
| centroids | -matrix | Matrix in which centroids are stored. | - |
|
|
|
| foreceConvergence | +integer(bool) | Flag whether to force each centroid seed to converge regardless of maxIterations. | (1)true |
|
|
|
| useSeeds | +integer(bool) | Set true to use seeds. | (1)true |
|
|
|
|
|
|
---
|
|
|
|
|
|
# Connected Links/Resources
|
|
|
|
|
|
If you want a more detailed explanation, then go to the python documentation. There is most of the time a good explanation on how the methods work and what the parameters do.
|
|
|
|
|
|
* [MLpack::mean_shift_C++\_documentation](https://www.mlpack.org/doc/stable/doxygen/classmlpack_1_1meanshift_1_1MeanShift.html)
|
|
|
* [MLpack::mean_shift_Python_documentation](https://www.mlpack.org/doc/stable/python_documentation.html#mean_shift)
|
|
|
|
|
|
added some of the links from the python documentation
|
|
|
|
|
|
* kmeans
|
|
|
* dbscan
|
|
|
* [Mean shift on Wikipedia](https://en.wikipedia.org/wiki/Mean_shift)
|
|
|
* [Mean Shift, Mode Seeking, and Clustering (pdf)](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.510.1222&rep=rep1&type=pdf) |
|
|
\ No newline at end of file |