Shubha Vishwanath Karanth
2010-Apr-24 12:58 UTC
[R] DICE Coefficient of similarity measure
Hi, I wanted the DICE coefficient (similarity measure for binary variables) to be calculated in R and found that the "igraph" package has the option of "similarity.dice" to do this. But, for this command, the input object should be an igraph object. But, I have a dataframe of columns containing 1's and 0's. Can I convert this dataframe into an igraph object, so that the DICE coefficient can be reproduced? Or does any other packages gives the DICE coefficient? Thanks, Shubha This e-mail may contain confidential and/or privileged i...{{dropped:13}}
Shubha Vishwanath Karanth
2010-Apr-24 14:23 UTC
[R] DICE Coefficient of similarity measure
Just wrote a small piece of code to do so. Thanks. -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Shubha Vishwanath Karanth Sent: Saturday, April 24, 2010 6:28 PM To: r-help at r-project.org; r-help at stat.math.ethz.ch Cc: Gabor.Csardi at unil.ch Subject: [R] DICE Coefficient of similarity measure Hi, I wanted the DICE coefficient (similarity measure for binary variables) to be calculated in R and found that the "igraph" package has the option of "similarity.dice" to do this. But, for this command, the input object should be an igraph object. But, I have a dataframe of columns containing 1's and 0's. Can I convert this dataframe into an igraph object, so that the DICE coefficient can be reproduced? Or does any other packages gives the DICE coefficient? Thanks, Shubha This e-mail may contain confidential and/or privileged i...{{dropped:13}} ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. This e-mail may contain confidential and/or privileged i...{{dropped:10}}
Hi R, Is there a package in R to perform KMedian clustering? Thanks. Shubha This e-mail may contain confidential and/or privileged i...{{dropped:10}}
pam/clara in package cluster are probably as close to it as you can be. There is no unique definition of a multivariate median and therefore there is no unique definition of "k-medians", but pam/clara is one possible version of it. (Of course if you think of k-medians as defined in a specific paper, it may still be something slightly different.) Christian On Thu, 16 Sep 2010, Shubha Vishwanath Karanth wrote:> Hi R, > > Is there a package in R to perform KMedian clustering? > > Thanks. > Shubha > This e-mail may contain confidential and/or privileged i...{{dropped:10}} > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >*** --- *** Christian Hennig University College London, Department of Statistical Science Gower St., London WC1E 6BT, phone +44 207 679 1698 chrish at stats.ucl.ac.uk, www.homepages.ucl.ac.uk/~ucakche
Thanks all. But I was looking for "KMedian" algorithm and not the "KMedoids" algorithm. The wiki says, " Note that this algorithm is often confused with k-medoids, which finds the optimal medoid, not median, for each cluster. (A medoid is an actual point from the dataset; a median is the mathematical median calculated separately for each dimension.)" Any package which does KMedian clustering algorthm? Many Thanks. ? Regards, Shubha. -----Original Message----- From: Christian Hennig [mailto:chrish at stats.ucl.ac.uk] Sent: Thursday, September 16, 2010 9:32 PM To: Shubha Vishwanath Karanth Cc: r-help at r-project.org; r-help at stat.math.ethz.ch Subject: Re: [R] KMedians clustering in R pam/clara in package cluster are probably as close to it as you can be. There is no unique definition of a multivariate median and therefore there is no unique definition of "k-medians", but pam/clara is one possible version of it. (Of course if you think of k-medians as defined in a specific paper, it may still be something slightly different.) Christian On Thu, 16 Sep 2010, Shubha Vishwanath Karanth wrote:> Hi R, > > Is there a package in R to perform KMedian clustering? > > Thanks. > Shubha > This e-mail may contain confidential and/or privileged i...{{dropped:10}} > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >*** --- *** Christian Hennig University College London, Department of Statistical Science Gower St., London WC1E 6BT, phone +44 207 679 1698 chrish at stats.ucl.ac.uk, www.homepages.ucl.ac.uk/~ucakche This e-mail may contain confidential and/or privileged i...{{dropped:10}}