找到最常见的一组值(Finding the most common set of values)

系统教程 行业动态 更新时间:2024-06-14 16:59:47
找到最常见的一组值(Finding the most common set of values)

给定每个包含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 G

How would I go about finding the set that relates to the others the most, being:

A A D F G

Does 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.

更多推荐

本文发布于:2023-04-17 09:12:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/3aed6dc619cc0a000739327bdb182ab3.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:最常见   Finding   common   set   values

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!