Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Mean Shift algorithm clusters an n-dimensional data set (i.e., each data point is described by a feature vector of n values) by associating each

The Mean Shift algorithm clusters an n-dimensional data set (i.e., each data point is described by a feature vector of n values) by associating each point with a peak of the data sets probability density. For each point, Mean Shift computes its associated peak by first defining a spherical window at the data point of radius r and computing the mean of the points that lie within the window. The algorithm then shifts the window to the mean and repeats until convergence, i.e., until the shift is less than a threshold (e.g., 0.01). At each iteration the window will shift to a more densely populated portion of the data set until a peak is reached, where the data is equally distributed in the window. Implement the peak searching processes as the function (10 points):

function peak = findpeak(data,idx,r)

where data is an n p matrix containing p data points, each point is defined by an ndimensional column vector of feature values; idx is the column index of the data point for which we wish to compute its associated density peak; and r is the search window radius.

Implement the meanshift function (10 points), which calls findpeak for each point and then assigns a label to each point according to its peak. This function should have the syntax:

function [labels,peaks] = meanshift(data,r)

where labels is a 1 p vector that has an entry for each data point of data storing its associated cluster label, and peaks is an n p matrix storing the density peaks found using meanshift for each data point. Peaks should be compared after each call to findpeak and similar peaks should be merged. For your implementation, consider two peaks to be the same if the distance between them is r/2. Also, if the peak associated with a data point is found to already exist in peaks, then for simplicity its computed peak is discarded and it is given the label of the already existing peak in peaks.

We are supposed to implement the above mentioned problem in Matlab.Can anyone help me with this.(Data Set is supposed to be random).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

=+ a. What happens to the labor demand curve?

Answered: 1 week ago