资源简介
《数据挖掘算法原理与实现》王振武书中源代码及测试数据,出版社提供版本
代码片段和文件信息
#include
#include
#include
#include
#include
#define InputlayerNum 35
#define OutputlayerRow 8
#define OutputlayerColumn 12
#define total_iteration_Num 80//10000//80//100//1000
#define error_limit 0.0000000000008//0.1//0.0000000000008//0.000000000000008//0.0001
#define efficiency 0.9//0.3//0.9//0.3//0.9
int ijklmn;
int inputMode[26][7][5];
double weight[OutputlayerRow*OutputlayerColumn][InputlayerNum];
int current_iteration_num=0;
double study_efficiency=efficiency;
long double distance[OutputlayerRow*OutputlayerColumn];
int neighbor_width=OutputlayerColumn;
int neighbor_height=OutputlayerRow;
int row[OutputlayerRow]column[OutputlayerColumn];
int flag[OutputlayerRow][OutputlayerColumn];
int temp_rowtemp_column;
int winner_rowwinner_column;
long double min_distance=1000.0;
/****************************************************************/
//该函数初始化距离变量为0初始化保存胜出节点的位置的变量
/****************************************************************/
void init_distance()
{
for(i=0;iyerRow;i++)
for(j=0;jyerColumn;j++)
distance[i*OutputlayerColumn+j]=0.0;
}
/****************************************************************/
//该函数用于计算欧氏距离并找到获胜神经元
/****************************************************************/
void eula_distance()
{
int ttLowttUpppLowppUp;
ttLow=winner_column-neighbor_width/2;
ttUp=winner_column+neighbor_width/2;
ppLow=winner_row-neighbor_height/2;
ppUp=winner_row+neighbor_height/2;
if(ttLow<0)
ttLow=0;
if(ttUp>=OutputlayerColumn)
ttUp=OutputlayerColumn-1;
if(ppLow<0)
ppLow=0;
if(ppUp>=OutputlayerRow)
ppUp=OutputlayerRow-1;
for(i=ppLow;i<=ppUp;i++)
for(j=ttLow;j<=ttUp;j++)
{
if(!(flag[i][j]==100))
{
for(m=0;m<7;m++)
for(n=0;n<5;n++)
distance[i*OutputlayerColumn+j]+=
pow((inputMode[l][m][n]-weight[i*OutputlayerColumn+j][m*5+n])2);
if(distance[i*OutputlayerColumn+j] {
min_distance=distance[i*OutputlayerColumn+j];
temp_row=i;
temp_column=j;
}
}
}
if(current_iteration_num>0)
{
if(min_distance<=error_limit)
{
row[temp_row]=temp_row;
column[temp_column]=temp_column;
flag[temp_row][temp_column]=100;
}
}
}
/****************************************************************/
//调整权值
/****************************************************************/
void weight_change()
{
int ttLowttUpppLowppUp;
winner_row=temp_row;
winner_column=temp_column;
ttLow=winner_column-neighbor_width/2;
ttUp=winner_column+neighbor_width/2;
ppLow=winner_row-neighbor_height/2;
ppUp=winner_row+neighbor_height/2;
if(ttLow<0)
ttLow=0;
if(ttUp>=OutputlayerColumn)
ttUp=OutputlayerColumn-1;
if(ppLow<0)
ppLow=0;
if(ppUp>=OutputlayerRow)
ppUp=OutputlayerRow-1;
for(i=ppLow;i<=ppUp;i++)
for(j=ttLow;j<=ttUp;j++)
{
if(!(flag[i][j]==100))
{
for(m=0;m<7;m++)
for(
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 25483 2013-12-24 20:47 MyProjects\10_4_SOM\1.png
文件 4303 2013-12-24 20:46 MyProjects\10_4_SOM\10_4_SOM.dsp
文件 524 2013-12-24 20:36 MyProjects\10_4_SOM\10_4_SOM.dsw
文件 50176 2013-12-24 20:50 MyProjects\10_4_SOM\10_4_SOM.ncb
文件 48640 2013-12-24 20:50 MyProjects\10_4_SOM\10_4_SOM.opt
文件 900 2013-12-24 20:49 MyProjects\10_4_SOM\10_4_SOM.plg
文件 26674 2013-12-24 20:47 MyProjects\10_4_SOM\2.png
文件 22987 2013-12-24 20:54 MyProjects\10_4_SOM\3.png
文件 270432 2013-12-24 20:49 MyProjects\10_4_SOM\Debug\10_4_SOM.exe
文件 300184 2013-12-24 20:49 MyProjects\10_4_SOM\Debug\10_4_SOM.ilk
文件 333928 2013-12-24 20:49 MyProjects\10_4_SOM\Debug\10_4_SOM.pch
文件 623616 2013-12-24 20:49 MyProjects\10_4_SOM\Debug\10_4_SOM.pdb
文件 43171 2013-12-24 20:49 MyProjects\10_4_SOM\Debug\SOM.obj
文件 91136 2013-12-24 20:50 MyProjects\10_4_SOM\Debug\vc60.idb
文件 118784 2013-12-24 20:49 MyProjects\10_4_SOM\Debug\vc60.pdb
文件 10963 2013-12-24 20:49 MyProjects\10_4_SOM\SOM.cpp
文件 214908 2013-12-24 20:43 MyProjects\10_4_SOM\SOM.txt
文件 2922 2005-12-28 15:33 MyProjects\10_4_SOM\相关数据\输入数据\input.txt
文件 2920 2005-12-30 21:10 MyProjects\10_4_SOM\相关数据\输入数据\非标准数据测试.txt
文件 50712 2013-12-24 20:50 MyProjects\10_4_SOM\相关数据\输出数据\初始的权值.txt
文件 2470 2013-12-24 20:50 MyProjects\10_4_SOM\相关数据\输出数据\向量模式.txt
文件 737 2013-12-24 20:50 MyProjects\10_4_SOM\相关数据\输出数据\标准测试.txt
文件 321 2013-12-24 20:50 MyProjects\10_4_SOM\相关数据\输出数据\获胜节点.txt
文件 56856 2013-12-24 20:50 MyProjects\10_4_SOM\相关数据\输出数据\训练后所有权值.txt
文件 15401 2013-12-24 20:50 MyProjects\10_4_SOM\相关数据\输出数据\训练后胜出权值.txt
文件 445 2013-12-24 20:50 MyProjects\10_4_SOM\相关数据\输出数据\迭代次数.txt
文件 737 2013-12-24 20:50 MyProjects\10_4_SOM\相关数据\输出数据\非标准测试.txt
文件 4340 2013-12-24 15:47 MyProjects\3_4_Apriori\3_4_Apriori.dsp
文件 530 2013-12-24 15:15 MyProjects\3_4_Apriori\3_4_Apriori.dsw
文件 33792 2013-12-24 15:47 MyProjects\3_4_Apriori\3_4_Apriori.ncb
............此处省略553个文件信息
相关资源
- 神经网络与模糊神经网络
- 数据挖掘与机器学习——WEKA应用技术
- Introduction to Data Mining 中文版书籍
- 哈工大数据挖掘理论与算法 作业1
- 基于谱聚类的金融时间序列数据挖掘
- RapidMiner7数据挖掘与实战csv数据包
- 数据挖掘:实用案例分析01
- 数据挖掘原理与算法(第3版)
- 数据挖掘导论 英文版
- 包含数据分析和数据挖掘的学习代码
- 数据挖掘原理与SPSS+Clementine应用宝典
- 数据仓库与数据挖掘 - 陈志泊
- 数据挖掘+相似性分析和用户偏好推荐
- Web数据挖掘pdf+ppt合集
- 数据挖掘导论:完整版(美P.N.Tan 20
- 数据挖掘与数据化运营实战 思路、方
- Airbnb 新用户的民宿预定预测-数据集
- Introduction to Data Mining 数据挖掘导论
- Introduction to Data Mining 数据挖掘导论
- 基于数据挖掘的旅游推荐APP
- 数据挖掘与机器学习 WEKA应用技术与实
- 袁博数据挖掘到推荐系统.zip
- 数据挖掘导论-中文版-Pang-Ning Tan,M
- 论文研究-数据挖掘中关联规则挖掘的
- 数据挖掘建模过程——思维导图
- 教程
- 数据挖掘——实用机器学习工具与技
- 数据挖掘PPT.zip
- 数据挖掘导论(完整版),数据挖掘
- 统计学习基础中英文版都有
评论
共有 条评论