Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to implement k-means using Jaccard distance

Subject: How to implement k-means using Jaccard distance

From: Ali Ml

Date: 30 Aug, 2012 09:17:07

Message: 1 of 4

Hi

I am quite new to matlab and wishes to inquire anyone know how to implement kmeans using jaccard distance. Currently, only cosine, cityblock,hamming and some others are been supported.

Please advise. Appreciate your help. Thanks.

Subject: How to implement k-means using Jaccard distance

From: Yumnam Kirani

Date: 30 Aug, 2012 10:13:07

Message: 2 of 4

"Ali Ml" wrote in message <k1nb2j$rt4$1@newscl01ah.mathworks.com>...
> Hi
>
> I am quite new to matlab and wishes to inquire anyone know how to implement kmeans using jaccard distance. Currently, only cosine, cityblock,hamming and some others are been supported.
>
> Please advise. Appreciate your help. Thanks.
The process will remain the same as in the case of implementing k-means using other distance measures. Only thing that will different is the way how jaccard distance is computed.

Yumnam Kirani Singh
Tronglaobi Awang Leikai

Subject: How to implement k-means using Jaccard distance

From: Ali Ml

Date: 30 Aug, 2012 13:28:08

Message: 3 of 4

"Yumnam Kirani" <kirani.singh@gmail.com> wrote in message <k1nebj$896$1@newscl01ah.mathworks.com>...
> "Ali Ml" wrote in message <k1nb2j$rt4$1@newscl01ah.mathworks.com>...
> > Hi
> >
> > I am quite new to matlab and wishes to inquire anyone know how to implement kmeans using jaccard distance. Currently, only cosine, cityblock,hamming and some others are been supported.
> >
> > Please advise. Appreciate your help. Thanks.
> The process will remain the same as in the case of implementing k-means using other distance measures. Only thing that will different is the way how jaccard distance is computed.
>
> Yumnam Kirani Singh
> Tronglaobi Awang Leikai

Thanks
But I need a sample code

Subject: How to implement k-means using Jaccard distance

From: Peter Perkins

Date: 30 Aug, 2012 14:13:05

Message: 4 of 4

On 8/30/2012 6:13 AM, Yumnam Kirani wrote:
> "Ali Ml" wrote in message <k1nb2j$rt4$1@newscl01ah.mathworks.com>...
>> Hi
>> I am quite new to matlab and wishes to inquire anyone know how to
>> implement kmeans using jaccard distance. Currently, only cosine,
>> cityblock,hamming and some others are been supported.
>>
>> Please advise. Appreciate your help. Thanks.
> The process will remain the same as in the case of implementing k-means
> using other distance measures. Only thing that will different is the way
> how jaccard distance is computed.
> Yumnam Kirani Singh
> Tronglaobi Awang Leikai

You can do this, but it leaves out half of the problem. Consider the
following:

The K-Means algorithm iterates between computing the centroid of a
cluster, and reassigning points to the cluster whose centroid each point
is nearest to. The centroid is defined as the position that minimizes
the sum of distances from points in a cluster to that centroid. For
squared Euclidean distance, the centroid is computed as the
coordinatewise arithmetic mean of the cluster's points. For city block
distance, it's the coordinatewise median. What is it for Jaccard
distance? Perhaps you could work that out, I don't know.

If not, you are left with an algorithm that computes centroids with
respect to one distance, and then assigns points with respect to
another. This is not generally recognized, but doesn't seem like a good
idea.

Perhaps you want to use hierarchical clustering, which doesn't have the
notion of centroids.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us