What is the diference between Bregman Divergence Mahalanobis Distance and Mahalanobis Distance?
agucaba123
Member Posts: 3 Contributor I
Hi, I'm a beginner in RapidMiner Studio. I'm working with clustering operators (kmeans and kmedoid) 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 suboption divergence: "Mahalanobis distance". I don't know if they are the same or not.
0
Best Answers

MartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,453 RM Data Scientist
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
 Sr. Director Data Solutions, Altair RapidMiner 
Dortmund, Germany1