Redian新闻
>
Help! A cluster method in SQL
avatar
Help! A cluster method in SQL# Database - 数据库
M*7
1
Hi guys, I have a question of cluster method in SQL.
A table contain 3 columns: rownumber, name, value.
I want to cluster the rows according to their values.
Step 1: First I create another table (tracking table), randomly put some
rows from the data table into this tracking table as the seeds.
Step 2: Then I want to calculate the (ith_value_from_datatable - jth_value_
from_trackingtable)**2, and assign ith row of data table into the jth group
according the the smallest distance calculated above.
avatar
n*6
2
My question is:
How many records do you have in the table?
If there are thousands of records, you need thousands of times of computing.
If there are millions of records, ...:( Database performance will be
horrible.
Probably better to process the calculation/clustering outside database.

group
jth

【在 M***7 的大作中提到】
: Hi guys, I have a question of cluster method in SQL.
: A table contain 3 columns: rownumber, name, value.
: I want to cluster the rows according to their values.
: Step 1: First I create another table (tracking table), randomly put some
: rows from the data table into this tracking table as the seeds.
: Step 2: Then I want to calculate the (ith_value_from_datatable - jth_value_
: from_trackingtable)**2, and assign ith row of data table into the jth group
: according the the smallest distance calculated above.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。