Bhattacharyya distance metric

View: New views
4 Messages — Rating Filter:   Alert me  

Bhattacharyya distance metric

by Diana Garrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I need to use the Bhattacharyya distance metric to determine population separation. Has anyone written a Bhattacharyya distance metric function in R?

Re: Bhattacharyya distance metric

by Nikos Alexandris :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2009-11-05 at 12:25 -0800, Diana Garrett wrote:
> I need to use the Bhattacharyya distance metric to determine population
> separation. Has anyone written a Bhattacharyya distance metric function in
> R?

Something like this ( I think it's correct ):

--%<---
DBhat <- function(X1,X2){
# define means
mX1 <- mean(X1)
mX2 <- mean(X2)

# define difference of means
mDiff <- mX1 - mX2

# define cov
cvX1 <- cov(X1)
cvX2 <- cov(X2)

# define halfsum of cv's
p <- (cvX1+cvX2)/2

# the equation
0.125 * t(mDiff) * p^(-1) * mDiff + 0.5 * log10( det(p) /
sqrt( det(cvX1) * det(cvX2) ))
--%<---

A related thread (in grass-stats):
http://www.mail-archive.com/grass-stats@.../msg00183.html

Regards, Nikos

______________________________________________
R-help@... 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.

Re: Bhattacharyya distance metric

by Liaw, Andy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is that another name for the Mahalanobis distance?  See ?mahalanobis.

> -----Original Message-----
> From: r-help-bounces@...
> [mailto:r-help-bounces@...] On Behalf Of Diana Garrett
> Sent: Thursday, November 05, 2009 3:26 PM
> To: r-help@...
> Subject: [R] Bhattacharyya distance metric
>
>
> I need to use the Bhattacharyya distance metric to determine
> population
> separation. Has anyone written a Bhattacharyya distance
> metric function in
> R?
> --
> View this message in context:
> http://old.nabble.com/Bhattacharyya-distance-metric-tp26221259
> p26221259.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@... 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.
>
Notice:  This e-mail message, together with any attachme...{{dropped:10}}

______________________________________________
R-help@... 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.

Parent Message unknown Re: Bhattacharyya distance metric

by jude.ryan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The Bhattacharyya distance is different from the Mahalanobis distance.
See:

 

http://en.wikipedia.org/wiki/Bhattacharyya_distance

 

There is also the Hellinger Distance and the Rao distance. For the Rao
distance, see:

 

http://www.scholarpedia.org/article/Fisher-Rao_metric

 

Jude

 

___________________________________________
Jude Ryan
Director, Client Analytical Services
Strategy & Business Development
UBS Financial Services Inc.
1200 Harbor Boulevard, 4th Floor
Weehawken, NJ 07086-6791
Tel. 201-352-1935
Fax 201-272-2914
Email: jude.ryan@...




Please do not transmit orders or instructions regarding a UBS
account electronically, including but not limited to e-mail,
fax, text or instant messaging. The information provided in
this e-mail or any attachments is not an official transaction
confirmation or account statement. For your protection, do not
include account numbers, Social Security numbers, credit card
numbers, passwords or other non-public information in your e-mail.
Because the information contained in this message may be privileged,
confidential, proprietary or otherwise protected from disclosure,
please notify us immediately by replying to this message and
deleting it from your computer if you have received this
communication in error. Thank you.

UBS Financial Services Inc.
UBS International Inc.
UBS Financial Services Incorporated of Puerto Rico
UBS AG

 
UBS reserves the right to retain all messages. Messages are protected
and accessed only in legally justified cases.
______________________________________________
R-help@... 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.