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

agucaba123agucaba123 Member Posts: 3 Contributor I
edited December 2018 in Help

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. 

Best Answers

  • Options
    DocMusherDocMusher Member Posts: 333 Unicorn
    Solution Accepted


    Perhaps these slides might explain your question? 



  • Options
    MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,524 RM Data Scientist
    Solution Accepted

    Hi @agucaba123,


    here is what we do:

    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?




    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
Sign In or Register to comment.