给定每个包含Y值的X数量的集合,我如何找到最常用的集合? (不确定常见是否合适)
作为一个例子,我有6组每个包含5个值:
A B C D E A A D L G G A B D F A A I F G A A D F G A B E F G我将如何找到与其他人最相关的集合,如下:
A A D F G这种统计是否有名字?
Given an X amount of sets each containing Y values, how do I find the most common set using? (Unsure if common is the right word)
As an example I have 6 sets each containing 5 values:
A B C D E A A D L G G A B D F A A I F G A A D F G A B E F GHow would I go about finding the set that relates to the others the most, being:
A A D F GDoes this sort of statistics have a name?
最满意答案
对于每个集合,计算其自身与其他集合之间的Levenshtein距离的总和。 总和最小的集合是与其他集合最相似的集合。 您可以选择使用动态编程来提高程序的效率。
For each set, compute the summation of the Levenshtein distance between itself and the other sets. The set with the smallest summation is the set which is most similar to the others. You can choose to use dynamic programming to improve the efficiency of your program.
更多推荐
发布评论