What is the diference between Bregman Divergence Mahalanobis Distance and Mahalanobis Distance?

agucaba123
agucaba123 New Altair Community Member
edited November 2024 in Community Q&A

Hi, I'm a beginner in RapidMiner Studio. I'm working with clustering operators (k-means and k-medoid) and I want to know what is the diference between the Mahalanobis Distance (https://en.wikipedia.org/wiki/Mahalanobis_distance) and the option in the parameters of the operator which says "Bregman divergences" and the sub-option divergence: "Mahalanobis distance". I don't know if they are the same or not. 

Tagged:

Best Answers

  • DocMusher
    DocMusher New Altair Community Member
    Answer ✓

    Hi,

    Perhaps these slides might explain your question? 

    Cheers

    Sven

  • MartinLiebig
    MartinLiebig
    Altair Employee
    Answer ✓

    Hi @agucaba123,

     

    here is what we do:

    	@Override
    public double calculateDistance(double[] value1, double[] value2) {

    Matrix x = new Matrix(value1, value1.length);
    Matrix y = new Matrix(value2, value2.length);

    Matrix deltaxy = x.minus(y);

    // compute the mahalanobis distance
    return Math.sqrt(deltaxy.transpose().times(inverseCovariance).times(deltaxy).get(0, 0));
    }

    Does this make sense?

     

    BR,

    Martin

Answers

  • DocMusher
    DocMusher New Altair Community Member
    Answer ✓

    Hi,

    Perhaps these slides might explain your question? 

    Cheers

    Sven

  • MartinLiebig
    MartinLiebig
    Altair Employee
    Answer ✓

    Hi @agucaba123,

     

    here is what we do:

    	@Override
    public double calculateDistance(double[] value1, double[] value2) {

    Matrix x = new Matrix(value1, value1.length);
    Matrix y = new Matrix(value2, value2.length);

    Matrix deltaxy = x.minus(y);

    // compute the mahalanobis distance
    return Math.sqrt(deltaxy.transpose().times(inverseCovariance).times(deltaxy).get(0, 0));
    }

    Does this make sense?

     

    BR,

    Martin