What is the diference between Bregman Divergence Mahalanobis Distance and Mahalanobis Distance?
agucaba123
New Altair Community Member
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:
0
Best Answers
-
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
1
Answers
-
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
1