问题描述
这是一个艰难的过程。
This is a tough one. There is probably a name for this and I don't know it, so I'll describe the problem exactly.
我有一个数据集,其中包括许多用户提交的数据价值观。我需要能够根据某种平均水平或更佳的水平来确定数据的接近度,即哪个值是正确的值。例如,如果我从三个用户4、10、3收到以下三个提交,则我知道在这种情况下3或4是正确的值。如果将其平均,我将得到5.6,这不是预期的结果。
I have a dataset including a number of user-submitted values. I need to be able to determine based on some sort of average, or better, a "closeness of data", which value is the correct value. For example, if I received the following three submissions from three users, 4, 10, 3, I would know that 3 or 4 would be the "correct" value in this case. If I were to average it out, I'd get 5.6 which is not the intended result.
我正在尝试使用MySQL和PHP来实现。
I'm attempting to do this using MySQL and PHP.
tl; dr需要基于相对值的接近度(使用MySQL / PHP)从数据集中查找值
谢谢!
推荐答案
使用数据库进行群集不会成为单一查询类型程序。需要迭代才能有效地生成群集。
Clustering using a database isn't going to be a single query type of procedure. It takes iterations to generate the clusters effectively.
您首先需要确定所需的群集数。如果您只想要一个群集,那么显然所有内容都会纳入其中。如果要两个,则可以编写程序,使用某种相关度量将节点分为两组。
You first need to decide how many clusters you want. If you wanted only one cluster, then obviously everything would go into it. If you want two, then you can write your program to separate the nodes into two groups using some sort of correlation metric.
换句话说,我不认为这是MySQL问题,而不仅仅是集群问题。
In other words, I don't think this is a MySQL question so much as a clustering question.
这篇关于“集群分析”;与MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!