1

I was trying to answer to this question Traminer substitution cost

And it occurred to me that I don't really know in what direction the matrix is treated by TraMineR. Let's say for example that i have the following matrix

   A   B

A  0   1

B  2   0

does that mean that TraMineR considers A->B cost is 2 or that B->A cost is 2 ?

thanks !

Community
  • 1
  • 1
Pedro Braz
  • 2,261
  • 3
  • 25
  • 48
  • A substitution cost matrix is symmetric by definition. So, your example can just not happen. – Gilbert Feb 20 '15 at 16:39
  • @Gilbert I appreciate the effort. If you go to [wikipedia](http://en.wikipedia.org/wiki/Distance_matrix) you'll see in the section "Comparison with euclidean distance matrix" that it is not necessairly symmetric. Additionally in Optimal Matching Review (Biemann & Datta 2013) they talk about non symmetric costs specially for transitions sequences – Pedro Braz Feb 20 '15 at 17:50
  • 1
    Your question is about costs, not distances. Now, about this distance issue, I don't know what concept of distance is considered in the wikipedia article you mention since no reference is provided there. On http://en.wikipedia.org/wiki/Metric_%28mathematics%29, for example, it is stated that, among other conditions, a distance function must satisfy the symmetry condition. This is also what you will find in textbooks in mathematics and data analysis. – Gilbert Feb 21 '15 at 17:19

1 Answers1

2

Your question is about substitution costs in TraMineR, and TraMineR uses substitution costs for computing optimal matching and related dissimilarity measures. Costs are supposed to reflect the dissimilarity between states.

The algorithm used for determining the minimal cost of editing one sequence into the other is essentially Needleman & Wunsch , and this algorithm assumes the costs are symmetric.

So, your question is not a concern for TraMineR.

If you really want to use a concept of non-symmetric costs, you will have to look for algorithms---or define your own algorithm---to evaluate the dissimilarity between sequences from such non-symmetric costs. No such function is provided by TraMineR.

Gilbert
  • 3,570
  • 18
  • 28