I have the following data as follows:
| object | l2a | l2b | l4 | l5 |
|---|---|---|---|---|
| a | 0.6649 | 0.5916 | 0.033569 | 0.557373 |
| b | 0.8421 | 0.5132 | 0.000000 | 0.697193 |
| c | 0.6140 | 0.2807 | 0.084217 | 0.650313 |
| d | 0.7619 | 0.3810 | 0.000000 | 0.662306 |
| e | 0.6957 | 0.3043 | 0.000000 | 0.645135 |
Is it possible to measure the similarity between (a-b), (a-c), (a-d), (a-e), (b-c), ..., (d,e) using RMSE?
For example:
Similarity between object a (_a) and object b (_b):
diff_l2a = l2a_a - l2a_b
diff_l2b = l2b_a - l2b_b
diff_l4 = l4_a - l4_b
diff_l5 = l5_a - l5_b
Then calculate the RMSE:
RMSEs = [RMSE(diff_l2a, diff_l2b), RMSE(diff_l2a, diff_l4), RMSE(diff_l2a, diff_l5), ..., RMSE(diff_l4, diff_l5)]
Similarity:
average(RMSEs)
RMSE Similarity DF Code part:
Code (with DF):
Output:
Addition:
If you want to calculate pairwise RMSE-based similarity:
Others: https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.pdist.html