I have two matrices/datasets whose columns either have continuous or categorical values. One matrix is a perturbed version of the other. I'm looking for a distance measure for comparison and reporting that takes the data type in account, i.e., there is a higher penalty if two categorical variables are different compared to just a simple difference between two matrices.
I have two $n \times m$ matrices, $X$ and $Y$. $Y$ is a perturbed version of $X$. Usually i can measure the distance using some measure, say
$$d(x,y) = \sum_{n=1}^z\sum_{m=1}^z|x_{nm} - y_{nm}|$$
but $X$ and $Y$ have some columns with binary values and other columns with continuous values. Let's say my binary column indicates patient status (alive/dead). Now, when I use the above formula, it gives equal weight to all columns using same scale. i.e. for this measure, 33-32 is same is 1-0 from status column.
I want to use a distance measure that weighs the columns accordingly. Ideally, status 0 perturbed to 1 in binary column should be worse than, say weight perturbed from 70 to 71.
Apologies if it is straightforward.