Measuring Sequence Similarity with Absolute Differences

  • Thread starter onako
  • Start date
In summary, the conversation discusses a problem involving two sequences and asks for an algorithm to measure the similarity between them. One suggestion is to use the sum of the absolute values of the differences between each entry. Other suggestions, such as using powers of the absolute value of the difference, are also mentioned.
  • #1
onako
86
0
Hi all,

I'm faced with the following problem (it involves two equally large number sequences, or vectors; therefore, it might be considered as a problem of number theory, I guess; please move it to appropriate place if you think differently):
Given two sequences, for example:
A=[1, 2, 4, 6, 7, 2, 1];
B=[1, 2, 4, 7, 8, 2, 1];
Give an algorithm that should express the entrywise similarity/closeness of the sequences by a certain number. For the above sequeces, A and B are similar(differ in two entries); the sequence C might have all 5's and is still more similar to A than sequence D with all 100's...
I thought of the following:
[tex]
\sum |a_i-b_i|
[/tex]
Other proposals are very welcome. Many thanks
 
Physics news on Phys.org
  • #2
There are many. Typical ones involve powers of the abs. value of the difference, where the exponent 2 is most often used. (Look up lp, especially p=2. You are describing p=1.).
 

FAQ: Measuring Sequence Similarity with Absolute Differences

What is number sequence similarity?

Number sequence similarity is the measure of how closely related two or more sequences of numbers are to each other. It looks at the patterns and relationships between numbers in a sequence to determine their level of similarity.

How is number sequence similarity calculated?

Number sequence similarity is usually calculated using mathematical algorithms that compare the numbers in a sequence. Some common methods include Pearson's correlation coefficient, Euclidean distance, and dynamic time warping.

What is the significance of number sequence similarity?

Number sequence similarity is used in various fields such as data analysis, genetics, linguistics, and computer science. It helps to identify patterns and relationships between data sets, which can provide insights and predictions for future trends and behavior.

Can number sequence similarity be used for predictive modeling?

Yes, number sequence similarity can be used for predictive modeling. By analyzing the patterns and relationships between numbers in a sequence, we can make predictions about future values and trends in the sequence.

Are there any limitations to using number sequence similarity?

Yes, there are some limitations to using number sequence similarity. It is important to choose the appropriate method for calculating similarity based on the specific type of data and context. Additionally, the results may be affected by missing data or outliers in the sequence.

Similar threads

Replies
7
Views
1K
Replies
7
Views
1K
Replies
1
Views
1K
Replies
3
Views
2K
Replies
4
Views
3K
Replies
2
Views
1K
Replies
33
Views
3K
Back
Top