April 2016
Beginner to intermediate
384 pages
8h 36m
English
A method similar in terms of finding centers (or maxima of density) is the Mean Shift model. In contrast to the k-means, the method does not require specifying the number of clusters—the model returns the number of clusters based on the number of density centers found in the data.
To estimate this model, you will need pandas and Scikit. No other prerequisites are required.
We start the estimation in a similar way as with the previous models—by reading the dataset in and limiting the number of features. Then, we use findClusters_meanShift(...) to estimate the model (the clustering_meanShift.py file):
def findClusters_meanShift(data): ''' Cluster data using Mean Shift method ...