Multidimensional Scaling with Categorical Data

using MDS requires an understanding of the individual feature's units; maybe we are using features that cannot be compared using the Euclidean metric. For instance, a categorical variable, even when encoded as an integer (0= circle, 1= star, 2= triangle, and so on), cannot be compared using Euclidean (is circle closer to star than to triangle?).

I accept the statement above, but it raises a few question about the application of MDA:

• Given the fact that many conventional data sets contain categorical features, does it mean that MDA cannot fit to these sets?
• Maybe it would be a solution to change the distance measure type (e. g. "Euclidean") to other, but Sklearn has no other built-in option, not to mention R, where cmdscale has no option at all to specify distance type. How to change this feature in general?

An additional question: I have read that PCA is a kind of MDS (or vice versa), apart from the fact that the former focuses on variance, the latter on keeping distance. Am I right that the two "converges" somehow (in case of visualization with the two first component, for instance)?

MDS only requires a distance matrix which stores the distance between each pair of data examples. How to compute that distance depends on the kind of data you are dealing with. If you only have numerical (real valued) features, you can use the Euclidean distance, but that is not always the case.

For instance, if you have both numerical and categorical variables, you may apply any metric for mixed data, like for instance this one.

Regarding your second question, I need further clarification. What do you mean by "converging? Are you asking if both algorithms converge to the same solution? Is that is your question, the answer is no, because the aim of both algorithms is different. MDS projects your data onto a 2D plane by trying to keep relative distances, whether PCA projects data by focusing on those "directions" in which there is more variability.

• Yes, by "converging" I meant similar results (by plotting, for instance). By the way, one more question: is standardization required beforehand in case of MDS? – Hendrik Oct 3 '16 at 7:19
• I don't see a reason why distance normalization would be required for MDS. – Pablo Suau Oct 3 '16 at 9:13
• I understand that all distance based operation require normalization. – Hendrik Oct 3 '16 at 10:26
• If you are referring to feature normalisation prior to distance computation, that is highly advisable in order to avoid bias. It is not a requirement of the algorithm, but something you should do anyway. – Pablo Suau Oct 3 '16 at 13:59