-
k-means算法
#include
#include
#define N 11 //代表数据点的个数
#define K 3 //代表簇的个数
typedef struct
{
float x;
float y;
}Point; //代表数据点的数据结构
int center[N]; //判断每个点属于哪个簇
Point point[N] = { {2.0, 10.0},{2.0, 5.0},{8.0, 4.0},{5.0, 8.0},{7.0, 5.0},
{6.0, 4.0},{1.0, 2.0},{4.0, 9.0},{7.0, 3.0},{1.0, 3.0},
{3.0, 9.0}};
Point mean[K]; //保存每个簇的中心点
float getDistance(Point point1, Point point2);
void getMean(int center[N]);
float getE();
void cluster();
int main()
{
int i, j;
int n = 0; //统计进行了多少次聚类
float temp1; //用于存平方误差
float temp2;
printf(" 处理的数据点集合为:
");
for(i = 0; i < N; ++i)
{
- 2022-01-26 19:53:04下载
- 积分:1
-
粒子群算法优化RBF网络
粒子群算法优化RBF网络,用PSO优化径向基神经网络的权值,简单好用。
- 2023-01-12 00:45:04下载
- 积分:1
-
puifunkun
sar图像去噪的几种新的方法,包括轨道机动仿真、初轨计算,针对EMD方法的不足。( Several new methods sar image denoising, Including orbital maneuvering simulation, initial orbit calculation, For lack of EMD.)
- 2017-05-05 11:43:23下载
- 积分:1
-
hiredis-vip-master
C/C++语言redis开发包,支持cluster,redis3.x可用(redis cluster lib for c/c++ , for redis version 3.x)
- 2019-06-24 16:20:39下载
- 积分:1
-
徐士良C常用算法程序集(第二版)
徐士良C常用算法程序集(第二版).(XU Shi-liang C algorithms commonly used procedures set (the second version).)
- 2020-06-26 10:40:01下载
- 积分:1
-
基于STM32的FM收音机
基于STM32系统以及嵌入式μC-Ⅱ系统的FM收音机,主任务程序含有4个任务
- 2022-01-25 16:36:06下载
- 积分:1
-
1
说明: 实现重力式热管换热器设计计算功能,简单按照设计任务书,给出所需热管的结构尺寸,涉及的热管蒸发段和冷凝段长度分别为1m,绝热段长度30cm,内径20cm,外径25cm,热管工质为水。(Realize the gravity heat pipe heat exchanger design and calculation functions , simple design in accordance with the mission statement , given the size of the required structure of the heat pipe , heat pipe evaporator and condenser section lengths were involved 1m, adiabatic length 30cm, inner diameter 20cm, 25cm outside diameter heat pipe working fluid is water.
)
- 2015-03-01 18:45:20下载
- 积分:1
-
KS0108_SYB128642
syb12864驱动程序,程序为三元晶公司的无字库12864液晶驱动(syb12864Drivers,Program s ternary crystal LCD driver 12864 free fonts)
- 2015-03-31 10:19:44下载
- 积分:1
-
dnn-0.1
说明: 用DNN编写的一次训练即可识别的小词汇量语音训练识别代码库,已通过测试(DNN prepared with a training can identify small vocabulary speech recognition code libraries that have passed the tests)
- 2005-09-04 11:30:50下载
- 积分:1
-
sf_2007523161027
C#直接读取3ds的源码,引用Microsoft.DirectX 打开三维文件。(Read 3ds C# source code directly.)
- 2011-08-09 15:16:33下载
- 积分:1