k_means算法的C++实现
首先画出k_means算法的流程图:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAsUAAALwCAIAAADwHp9RAAAgAElEQVR4nO3dr48rx7ru8YKBgYGhGwZuNksKiK4OiI50SeBIAR5pgdEoaMn/3JYm4ICADQIuOOCAgAUWWCDgEF9gu/uten90dbvtrrK/o49atWrKPZOVOP3M02VP+nQ4AGhWenqXNv9+AMCUNv8OAGhDgPj2x5Nvfn//5neCBYBGkSeAthzjwjE9fPN7mSe++f09/es9/YtIAaAt5AmgIenp/ZtjJ/H7+7e/v3/30/t3/3X20/t3P71/e04Y31BUAGgJeQJoxXB347uf3r8/+uP9H/9x8v0f79//8f79T+dgcY4Um3/bAPCJPAE0Ymwm5uQJIgWARpAngCYcy4ljVvj+P97/8cf7P/54/+Hn9x/+ffbz+w8/v//jj1OwOEaKb39kLwWAJpAngO0dN2B++/uplvjHH6cM8c8/3z/835N//vn+zz/ff/j3KWp8/9Npj8XxRR+b/yMAeHDkCWB7l+cJIgWAbZEngO0d88R3P53uZfzw8yk9fPjz/f/8v5MPf75/OEaKn99/+Pl0y+O7n8gTAJpAngA2Nr6s479OWy9/+Pepk/g//+/9P//75JQq/u+puvjHf5xeR8oWCgAtIE8AGyNPALgD5AlgY+QJAHeAPAFsbHh3bfZPAOgXeQLYHvsxAfSOPAFsj9eLAugdeQLYXnp6T/8S74/5B++PCaAz5AmgCdn7bZMnAPSGPAE0YfbvA/ud3wcGoCHkCaAVx0hxShW/v3/7+/t3P51eFPrdf40x4pg5vnl6T/+inADQCvIE0JA0N08QJgC0gTwBtOW4N/P4jhTfnNPDtz+OM0MtQZgA0A7yBNCcY1Y4+VcWIAabf5MAIJEngEYVAYIkAaBl5AmgA8QIAI0jTwAdIE8AaBx5AugAeQJA48gTQAfIEwAaR54AOkCeANA48gTQAfIEgMaRJ4AOkCcANI48AXSAPAGgceQJoAPkCQCNI08AHSBPAGgceQLoAHkCQOPIE0AHyBMAGkeeADpAngDQOPIE0AHy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OM+OHn9x/+ffbz+w8/v3//xylqeDc+7vUvGUDLyBO4tbtMMIu/EzMNfPMjeQJAZ8gTuH+3TzD18cJMA9/+/v79T6f08M8/3z+c/fPP93/++f7Dz6cbH9/+Tp4A0AryBLCCFeuTU57449RJfPjz/T//++SYKn7496m6+Pb39/Sv9/Sv8iTkCQC3R54AVrA4Q1wjT5inBYCrIk8AK1i2eeITeQLAvSBPACuYlSGKB+qZufsnuN8BYHPkCWAF9QFCP1DPsB8TQHfIE8CWzDTA60UBdIc8AWzMrih4f0wAXSFPABvzMgF5AkBHyBPAxoKXfvD7wAD0gjwBbC+IFOnp/KLQfy159SkA3AZ5AmhCEAXqX4NKngCwFfIE0ITLowBhAsCGyBNAK5a9g8Xw2M2/fwCPjDwBtGVuMrgkhQDAWsgTQHPqIwJJAkAjyBNAo7w9mLN+PwgA3AZ5AugAGQJA48gTAADgUuQJAABwKfIEAAC4FHkCAABc6v8Dyjgb0mpkUsUAAAAASUVORK5CYII=" alt="" width="709" height="752" />
具体代码,C++实现:
#include <iostream>
#include <fstream>
#include <cmath>
#include <ctime>
using namespace std; const int N = ; typedef struct {
double x1,x2;
int flag;
}oneNode; oneNode node[N];
int k,n; void DataInput();
void SetInitial(oneNode *p,oneNode *q);
void SetQzero(oneNode &qi);
bool GetExist(int xm,int *sb,int i);
void DataIteration(oneNode *p,oneNode *q,double &E1,double &E3);
double GetRange(oneNode &node1,oneNode &node2);
bool JudgeCondition(oneNode *p,oneNode *q);
void DataOutput(oneNode *p,double E1,double E3); int main(){
int E2=;
double E1 = ,E3;
n = ; DataInput(); //将txt文件中记录读入,存储到oneNode列表中 cout<<"请输入新的聚类数目:";
cin>>k;
oneNode *p = new oneNode[k];
oneNode *q = new oneNode[k]; SetInitial(p,q); //初始化开始的k个聚类中心 DataIteration(p,q,E1,E3); //循环处理每条记录,获得新的聚类中心 DataOutput(p,E1,E3); //输出程序运行结果 delete[] q;
delete[] p;
return ;
} void DataInput(){
ifstream ifs; //通过txt文件,读入所有记录,将记录存储到oneNode列表中
ifs.open("D:\k_means\\aa11.txt");
if (!ifs.is_open())
{
cout<<"文件读取失败"<<endl;
exit();
} while (!ifs.eof()) //将txt文件中记录,存储到node[]中
{
ifs>>node[n].x1;
ifs>>node[n].x2;
n++;
}
} void SetInitial(oneNode *p,oneNode *q){
int xm;
int *sb = new int[k];
srand((unsigned)time());
for (int i = ;i < k;i++)
{
do
{
xm = rand()%n;
} while (GetExist(xm,sb,i));
sb[i] = xm; p[i] = node[xm]; SetQzero(q[i]);
}
delete[] sb;
} void SetQzero(oneNode &qi){
qi.x1 = ;
qi.x2 = ;
qi.flag = ;
} bool GetExist(int xm,int *sb,int i){
bool b = false;
for (int j = ;j < i;j++)
{
if (sb[j] == xm)
{
b = true;
break;
}
}
return b;
} void DataIteration(oneNode *p,oneNode *q,double &E1,double &E3){
int i,j,E2 = ;
bool b;
do
{
E3 = ;
for(i = ;i < n;i++){
double mm = GetRange(node[i],p[]);
int m = ;
for (j = ;j < k;j++)
{
double nn = GetRange(node[i],p[j]);
if (mm > nn)
{
mm = nn;
m = j;
}
}
node[i].flag = m;
E3 += GetRange(node[i],p[m]);
q[m].x1 += node[i].x1;
q[m].x2 += node[i].x2;
q[m].flag += ;
}
if (E2 == )
{
E1 = E3;
}else if(E2 > ){
if (E1 <= E3)
{
break;
}else{
E1 = E3;
}
}
E2++;
for (i = ;i < k;i++)
{
if (q[i].flag != )
{
q[i].x1 = q[i].x1/q[i].flag;
q[i].x2 = q[i].x2/q[i].flag;
}
}
b = JudgeCondition(p,q);
for (i = ;i < k;i++)
{
p[i] = q[i]; SetQzero(q[i]);
}
} while (b); } double GetRange(oneNode &node1,oneNode &node2){
return pow(node1.x1-node2.x1,)+pow(node1.x2-node2.x2,);
} bool JudgeCondition(oneNode *p,oneNode *q){
bool bo = false;
for (int i = ;i < k;i++)
{
if (pow(p[i].x1-q[i].x1,)+pow(p[i].x2-q[i].x2,) >= 5.0)
{
bo = true;
break;
} }
return bo;
} void DataOutput(oneNode *p,double E1,double E3){
if (E1 != E3){
cout<<"操作失败"<<endl;
}else{
cout<<"本次总体误差是:"<<E1<<endl;
ofstream ofile("D://k_means/aa11result.txt");
for (int i = ;i < k;i++)
{
ofile<<"第"<<i+<<"个聚类中心是:"<<"("<<p[i].x1<<","<<p[i].x2<<")"<<endl<<"属于第"<<i+<<"个聚类的所有点是:"<<endl;
for (int j = ;j < n;j++)
{
if (node[j].flag == i)
{
ofile<<node[j].x1<<" "<<node[j].x2<<endl;
}
}
} }
}
k_means算法的C++实现的更多相关文章
- k_means算法+python实现
文章目录 一.原理 二.算法步骤 三.实例如下: 四.python代码实现: 一.原理 K均值算法使用的聚类准则函数是误差平方和准则,通过反复迭代优化聚类结果,使所有样本到各自所属类别的中心的距离平方 ...
- k_means算法C++实现,改为面向对象
画的类图如下:
- Python实现 K_Means聚类算法
使用 Python实现 K_Means聚类算法: 问题定义 聚类问题是数据挖掘的基本问题,它的本质是将n个数据对象划分为 k个聚类,以便使得所获得的聚类满足以下条件: 同一聚类中的数据对象相似度较高 ...
- 使用sklearn进行K_Means聚类算法
首先附上官网说明 [http://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html#examples-usin ...
- python机器学习(1:K_means聚类算法)
一.算法介绍 K-means算法是最简单的也是最著名的划分聚类算法,由于简洁和效率使得他成为所有聚类算法中最广泛使用的.算法的目的是使各个样本与所在均值的误差平方和达到最小(这也是评价K-means算 ...
- 建模分析之机器学习算法(附python&R代码)
0序 随着移动互联和大数据的拓展越发觉得算法以及模型在设计和开发中的重要性.不管是现在接触比较多的安全产品还是大互联网公司经常提到的人工智能产品(甚至人类2045的的智能拐点时代).都基于算法及建模来 ...
- 转载: scikit-learn学习之K-means聚类算法与 Mini Batch K-Means算法
版权声明:<—— 本文为作者呕心沥血打造,若要转载,请注明出处@http://blog.csdn.net/gamer_gyt <—— 目录(?)[+] ================== ...
- 机器学习算法实现(R&Python code)
Machine Learning Algorithms Machine Learning Algorithms (Python and R) 明天考试,今天就来简单写写机器学习的算法 Types Su ...
- Python—kmeans算法学习笔记
一. 什么是聚类 聚类简单的说就是要把一个文档集合根据文档的相似性把文档分成若干类,但是究竟分成多少类,这个要取决于文档集合里文档自身的性质.下面这个图就是一个简单的例子,我们可以把不同的文档聚合 ...
随机推荐
- 迷你MVVM框架 avalonjs 1.3.4发布
发现一个以前从来没发现的大BUG,紧急发布此版本. fix getEachProxy BUG,此BUG会导致监控数组在删除某元素然后再添加元素时出现问题. avalon ms-on-*绑定添加一个钩子 ...
- 迷你MVVM框架 avalonjs 1.3.2发布
时隔一个月,avalon的新版本终于出来了,本次更新带来强大的模块间通信机制,其他就往常一样FIX BUG. 在文本绑定里,IE会对流离于DOM树外的文本节点的data属性赋值报错,需要添加一层判定 ...
- Why Go's Declaration Syntax is better than C++?
[Why Go's Declaration Syntax is better than C++?] Newcomers to Go wonder why the declaration syntax ...
- python初步要点
[python初步要点] #! 用于告诉操作系统去哪里找Python解释器为运行您的程序. 1.print 的输出有以下2种形式,""%()的形式类似于C的printf. 要注意逗 ...
- Exception in thread "main" java.lang.UnsatisfiedLinkError:
[oracle@landor database]$ ./runInstaller 正在启动 Oracle Universal Installer... 检查临时空间: 必须大于 MB. 实际为 MB ...
- Shrio03 Authenticator、配置多个Realm、SecurityManager认证策略
1 Authenticator 简介 1.1 层次结构图 1.2 作用 职责是验证用户帐号,是ShiroAPI中身份验证核心的入口点:接口中声明的authenticate方法就是用来实现认证逻辑的. ...
- [leetcode]273. Integer to English Words 整数转英文单词
Convert a non-negative integer to its english words representation. Given input is guaranteed to be ...
- [z] How can we render CSS3 in a WebBrowser Control ?
http://www.pedautreppe.com/post/How-can-we-render-CSS3-in-a-WebBrowser-Control-.aspx
- CentOS7防火墙firewall相关操作
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disabl ...
- Java07
/* 定义一个类Demo,其中定义一个求两个数据和的方法, 定义一个测试了Test,进行测试. 变量什么时候定义为成员变量: 如果这个变量是用来描述这个类的信息的,那么,该变量就应该定义为成员变量. ...