Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calculate normalized euclidean distance

    Hi all,

    The Euclidean distance matrix could be obtained by using
    Code:
    use http://www.stata-press.com/data/r10/iris.dta,clear
    matrix diss D = seplen sepwid petlen petwid, L2
    Whereas, how can I calculate the normalized Euclidean distance according to the formula below?

    This formula is coming from the paper http://www.public.asu.edu/~huanliu/p...pakdd00clu.pdf page 4.
    The tricky thing is the difference between two observations at a variable k is divided by the maxk - mink value of that variable k before calculating the distance.

    Thank you so much for helping!

    Best regards,
    Jack

  • #2
    Is the normalized Euclidean distance is the Mahalanobis distance? If it is, how could I get the Mahalanobis distance by Stata? Thanks.

    Comment


    • #3
      You can find out whether you can calculate Mahalanobis distances in Stata by doing a search! Try search mahalanobis and look at the components of the mahapick package , for instance. (Also it could be useful for future reference to consult the FAQ, e.g. https://www.statalist.org/forums/help#before.)

      Comment

      Working...
      X