Skip to main content
Tweeted twitter.com/StackStats/status/1211980457379848193
added 598 characters in body; edited title
Source Link
Nick
  • 856
  • 7
  • 25

What is a metric can I use to calculate the distance between wordslabels?

Let's say we have a set of wordslabels of the same length, and we need to find the distance between wordsthem.

In the case of binary wordslabels, one can use the Hamming distance. For example, if $a = 01101$$l_1 = 01101$ and $b = 00111$$l_2 = 00111$, then $d (a, b) = 2$$d(l_1, l_2) = 2$.

In my case, wordslabels are formed from the alphabet $\{a, b, c, d, e\}$$A=\{a, b, c, d, e\}$, so the length of the alphabet is $5$$|A|=5$, and the length of each wordlabel is $4$$n=4$.

In my case, an ordinal scale is applicable for letters, i.e. from alphabet $A$:

$$a <b <c <d <e.$$$$a < b < c < d < e.$$

Examples of wordslabels: deed, aaaa, aaad, aaae, dada, cccd.

Edit.Edit. The Hemming distance for three wordslabels aaaa, aaad, aaae gives $d(aaaa, aaad) = d(aaaa, aaae)$$$d(aaaa, aaad) = d(aaaa, aaae)$$ but I am looking for a metric which will distinguish '$d$' and '$e$' and return $d(aaaa, aaad)<d(aaaa, aaae)$$$d(aaaa, aaad)<d(aaaa, aaae)$$ because $d<e$.

Edit 2.

For creating a label we use a threshold $T \in \mathbf{R}$ and apply the next function for the $i$-th element of $X=(x_1, x_2, \ldots, x_n)$: \begin{equation} f(x_i) = \begin{cases} a, & x_i \leq -T, \\ b, & -T < x_i \leq 0, \\ c, & x_i = 0, \\ d, & 0 < x_i \leq T, \\ e, & x_i >T. \ \end{cases} \end{equation} Finally, we use the concatination operator $\&$, for example, $a \& a \& a \& a= aaaa$.

Question. What a metric can I use to calculate the distance between wordslabels?

What is a metric can I use to calculate the distance between words?

Let's say we have a set of words of the same length, and we need to find the distance between words.

In the case of binary words, one can use the Hamming distance. For example, if $a = 01101$ and $b = 00111$, then $d (a, b) = 2$.

In my case, words are formed from the alphabet $\{a, b, c, d, e\}$, so the length of the alphabet is $5$, and the length of each word is $4$.

In my case, an ordinal scale is applicable for letters, i.e.

$$a <b <c <d <e.$$

Examples of words: deed, aaaa, aaad, aaae, dada, cccd.

Edit. Hemming distance for three words aaaa, aaad, aaae gives $d(aaaa, aaad) = d(aaaa, aaae)$ but I am looking for a metric which will distinguish '$d$' and '$e$' and return $d(aaaa, aaad)<d(aaaa, aaae)$ because $d<e$.

Question. What a metric can I use to calculate the distance between words?

What is a metric can I use to calculate the distance between labels?

Let's say we have a set of labels of the same length, and we need to find the distance between them.

In the case of binary labels, one can use the Hamming distance. For example, if $l_1 = 01101$ and $l_2 = 00111$, then $d(l_1, l_2) = 2$.

In my case, labels are formed from the alphabet $A=\{a, b, c, d, e\}$, so the length of the alphabet is $|A|=5$, and the length of each label is $n=4$.

In my case, an ordinal scale is applicable for letters from alphabet $A$:

$$a < b < c < d < e.$$

Examples of labels: deed, aaaa, aaad, aaae, dada, cccd.

Edit. The Hemming distance for three labels aaaa, aaad, aaae gives $$d(aaaa, aaad) = d(aaaa, aaae)$$ but I am looking for a metric which will distinguish $d$ and $e$ and return $$d(aaaa, aaad)<d(aaaa, aaae)$$ because $d<e$.

Edit 2.

For creating a label we use a threshold $T \in \mathbf{R}$ and apply the next function for the $i$-th element of $X=(x_1, x_2, \ldots, x_n)$: \begin{equation} f(x_i) = \begin{cases} a, & x_i \leq -T, \\ b, & -T < x_i \leq 0, \\ c, & x_i = 0, \\ d, & 0 < x_i \leq T, \\ e, & x_i >T. \ \end{cases} \end{equation} Finally, we use the concatination operator $\&$, for example, $a \& a \& a \& a= aaaa$.

Question. What a metric can I use to calculate the distance between labels?

added 22 characters in body; edited title
Source Link
Alexis
  • 30.7k
  • 8
  • 101
  • 176

What is a metric can I use to calculate the distance between words?

LetLet's say we have a set of words of the same length, and youwe need to find the distance between words. In

In the case of binary words, one can use the Hamming distance. For For example, if $a = 01101$ and $b = 00111$, then $d (a, b) = 2$.

In my case, words are formed from the alphabet $\{a, b, c, d, e\}$, so the length of the alphabet is $5$, and the length of each word is $4$.

In my case, an ordinal scale is applicable for letters  , i.e.
  

$$a <b <c <d <e.$$

Examples of words: deed, , aaaa, , aaad, , aaae, , dada, , cccd..

Edit. Hemming distance for three words aaaa, , aaad, , aaae gives $d(aaaa, aaad) = d(aaaa, aaae)$ but I am looking for a metric which will distinguish 'd''$d$' and 'e''$e$' and return    $d(aaaa, aaad)<d(aaaa, aaae)$ because $d<e$.

Question. What a metric can I use to calculate the distance between words?

What a metric can I use to calculate the distance between words?

Let say we have a set of words of the same length, and you need to find the distance between words. In the case of binary words, one can use the Hamming distance. For example, if $a = 01101$ and $b = 00111$, then $d (a, b) = 2$.

In my case, words are formed from the alphabet $\{a, b, c, d, e\}$, the length of the alphabet is $5$, the length of each word is $4$.

In my case, an ordinal scale is applicable for letters  , i.e.
 $$a <b <c <d <e.$$

Examples of words: deed, aaaa, aaad, aaae, dada, cccd.

Edit. Hemming distance for three words aaaa, aaad, aaae gives $d(aaaa, aaad) = d(aaaa, aaae)$ but I am looking for a metric which will distinguish 'd' and 'e' and return  $d(aaaa, aaad)<d(aaaa, aaae)$ because $d<e$.

Question. What a metric can I use to calculate the distance between words?

What is a metric can I use to calculate the distance between words?

Let's say we have a set of words of the same length, and we need to find the distance between words.

In the case of binary words, one can use the Hamming distance. For example, if $a = 01101$ and $b = 00111$, then $d (a, b) = 2$.

In my case, words are formed from the alphabet $\{a, b, c, d, e\}$, so the length of the alphabet is $5$, and the length of each word is $4$.

In my case, an ordinal scale is applicable for letters, i.e. 

$$a <b <c <d <e.$$

Examples of words: deed, aaaa, aaad, aaae, dada, cccd.

Edit. Hemming distance for three words aaaa, aaad, aaae gives $d(aaaa, aaad) = d(aaaa, aaae)$ but I am looking for a metric which will distinguish '$d$' and '$e$' and return  $d(aaaa, aaad)<d(aaaa, aaae)$ because $d<e$.

Question. What a metric can I use to calculate the distance between words?

Became Hot Network Question
added 233 characters in body
Source Link
Nick
  • 856
  • 7
  • 25

Let say we have a set of words of the same length, and you need to find the distance between words. In the case of binary words, one can use the Hamming distance. For example, if $a = 01101$ and $b = 00111$, then $d (a, b) = 2$.

In my case, words are formed from the alphabet $\{a, b, c, d, e\}$, the length of the alphabet is $5$, the length of each word is $4$.

In my case, an ordinal scale is applicable for letters , i.e.
$$a <b <c <d <e.$$

Examples of words: deed, aaaa, aaad, aaae, dada, cccd.

Edit. Hemming distance for three words aaaa, aaad, aaae gives $d(aaaa, aaad) = d(aaaa, aaae)$ but I am looking for a metric which will distinguish 'd' and 'e' and return $d(aaaa, aaad)<d(aaaa, aaae)$ because $d<e$.

Question. What a metric can I use to calculate the distance between words?

Let say we have a set of words of the same length, and you need to find the distance between words. In the case of binary words, one can use the Hamming distance. For example, if $a = 01101$ and $b = 00111$, then $d (a, b) = 2$.

In my case, words are formed from the alphabet $\{a, b, c, d, e\}$, the length of the alphabet is $5$, the length of each word is $4$.

In my case, an ordinal scale is applicable for letters , i.e.
$$a <b <c <d <e.$$

Examples of words: deed, aaaa, dada, cccd.

Question. What a metric can I use to calculate the distance between words?

Let say we have a set of words of the same length, and you need to find the distance between words. In the case of binary words, one can use the Hamming distance. For example, if $a = 01101$ and $b = 00111$, then $d (a, b) = 2$.

In my case, words are formed from the alphabet $\{a, b, c, d, e\}$, the length of the alphabet is $5$, the length of each word is $4$.

In my case, an ordinal scale is applicable for letters , i.e.
$$a <b <c <d <e.$$

Examples of words: deed, aaaa, aaad, aaae, dada, cccd.

Edit. Hemming distance for three words aaaa, aaad, aaae gives $d(aaaa, aaad) = d(aaaa, aaae)$ but I am looking for a metric which will distinguish 'd' and 'e' and return $d(aaaa, aaad)<d(aaaa, aaae)$ because $d<e$.

Question. What a metric can I use to calculate the distance between words?

Source Link
Nick
  • 856
  • 7
  • 25
Loading