Mean shift clustering of two-dimensional data

Beijing Institute of Technology | Ming-Jian Li

The following Python code is a companion code for the course on Artificial Intelligence and Simulation Science. It functions to build a Mean-Shift clustering model, automatically estimate the optimal bandwidth from the generated data, and iteratively shift each point toward the local density peak to discover clusters and their centers without specifying the number of clusters in advance.

The result is: