- 博客(20)
- 资源 (7)
- 收藏
- 关注
原创 逻辑回归(logistic regression)原理理解+matlab实现
原理参考: http://blog.csdn.net/ariessurfer/article/details/41310525 http://blog.csdn.net/abcjennifer/article/details/7716281matlab实现参考: http://www.cnblogs.com/denny402/p/4032381.html使用梯度下降法迭代:function t
2016-12-30 10:46:08 10112
转载 线性回归(linear regression)-matlab实现
原理参考: http://blog.csdn.net/abcjennifer/article/details/7691571 matlab实现参考: http://www.cnblogs.com/denny402/p/4032381.html使用梯度下降法迭代实现:function theta=linearRegression()% 梯度下降法寻找最合适的theta,使得J最小opti
2016-12-30 10:42:51 3380
转载 决策树ID3算法-matlab实现
ID3_decision_tree.m%% 使用ID3决策树算法预测销量高低clear ;%% 数据预处理disp('正在进行数据预处理...');[matrix,attributes_label,attributes] = id3_preprocess();%% 构造ID3决策树,其中id3()为自定义函数disp('数据预处理完成,正在进行构造树...');tree = id3(ma
2016-12-29 21:21:51 7635
转载 剪辑近邻法及压缩近邻法-matlab实现
% =====================压缩剪辑近邻算法(Condensing)====================% s: 划分的子集数目% Xn: 当前样本集% Xcur: 当前样本集经一次迭代后的样本集% Xi: 当前考试集% Xr: 当前参考集% K: 退出控制条件,迭代K次,若没有样本被剪辑掉,则退出% =============================
2016-12-29 21:17:04 6491
转载 近邻法的快速算法-matlab实现
% ==========================快速近邻算法===============================% ================聚类过程所使用的主要变量==============================% X: 随机产生的样本集 % l: 划分的子集数目% L: 水平数目% Xp: 节点p对应的样本子集% Mp: 各类的均值
2016-12-29 21:15:05 3657
转载 KNN算法的matlab实现
% ====================K-近邻法(KNN)=================================% X: 训练样本% x: 待判样本% K: 近邻数目 % flag1: 记录K个最近邻中属于第一类的个数% flag2: 记录K个最近邻中属于第二类的个数% ===============================================
2016-12-29 21:13:39 3698
原创 理智与情感
英国女作家简∙奥斯汀的小说《理智与情感》讲述了两姐妹对待感情的态度,一个理性,一个感性,借由这个名字,也来说说我的感性和理性。人总是一个掺杂着感性和理性的复合体和矛盾体,感性和理性就如天平的两端,每时每刻地较量,有时感性取胜,有时理性取胜。于我而言,大学毕业是一个分水岭,之前我更敏感细腻,之后我更麻木冷漠。所以从现在起,我可以开始正式地怀念我的大学时期了,因为那真的是我最感性的时期了。 那时的我,
2016-12-28 09:08:57 718
原创 希尔排序
程序代码:#include"stdio.h"#include"stdlib.h"#include<iostream>using namespace std;void swap(int&a, int&b){ int c; c = a; a = b; b = c;}//希尔排序法,就是将数据分组后进行排序,分组后可用直接插入排序、选择排序、冒泡排序等。voi
2016-12-19 10:00:15 336
原创 冒泡排序
程序代码:#include"stdio.h"#include"stdlib.h"#include<iostream>using namespace std;void swap(int &a, int &b){ int c; c = a; a = b; b = c;}void bubble_sort(int a[], int n){ printf("
2016-12-18 18:11:01 280
原创 选择排序
程序代码:#include"stdio.h"#include"stdlib.h"#include<iostream>using namespace std;void swap(int &a, int &b){ int c; c = a; a = b; b = c;}void select_sort(int a[], int n){ printf("
2016-12-18 15:54:12 260
原创 直接插入排序
程序代码:#include"stdio.h"#include"stdlib.h"#include<iostream>using namespace std;void swap(int &a, int &b){ int c; c = a; a = b; b = c;}void insert_sort(int a[], int n){ printf("
2016-12-18 12:34:34 324
原创 折半查找
折半查找-非递归方法:#include"stdio.h"#include"stdlib.h"#include<iostream>using namespace std;int zhebanfind(int a[], int n, int item){ int min = 0; int max = n - 1; int mid; while (min<=max)
2016-12-18 11:35:15 319
转载 k-means聚类算法——c语言
程序代码:#include"stdio.h"#include"stdlib.h"#include<iostream>using namespace std;#define N 11#define k 3typedef struct{ float x; float y;}Point;Point point[N] = { { 2.0, 10.0 }, { 2.0
2016-12-17 20:22:03 11618
原创 图操作
程序代码:#include"stdio.h"#include"stdlib.h"#include<iostream>using namespace std;typedef struct node{//定义链表中的一个结点 int adj; struct node*next;}arcnode;typedef struct vnode{//定义顶点类型 int data
2016-12-17 11:34:58 423
原创 二叉树操作
程序代码:#include"stdio.h"#include"stdlib.h"#include<iostream>using namespace std;typedef struct node{//定义一个二叉树结点 int data; struct node*lchild, *rchild;}binode,*bitree;void creatbitree(bitree*t
2016-12-17 10:22:47 360
原创 队列操作
程序代码:#include"stdio.h"#include"stdlib.h"#include<iostream>using namespace std;typedef struct node{//定义一个队列,由链表构成的队列 int data; struct node*next;}lnode,*listptr;typedef struct{ listptr fr
2016-12-16 10:52:00 353
原创 栈操作
程序代码:#include"stdio.h"#include"stdlib.h"#include<iostream>using namespace std;#define STACK_INIT_SIZE 100#define STACKINCREMENT 10typedef struct{//定义一个栈 int*base; int*top; int stacksiz
2016-12-16 09:48:04 507
原创 链表操作
程序代码:#include"stdio.h"#include"stdlib.h"#include<iostream>using namespace std;typedef struct node{//定义链表结点 int data; struct node*next;}lnode,*listptr;listptr generatelist(int n)//生成一个长度为n的链
2016-12-15 20:43:18 264
原创 动态创建顺序表,并进行插入删除操作
代码程序:#include"stdio.h"#include<iostream>#include"stdlib.h"using namespace std;#define maxsize 10typedef struct{ int*elem; int length; int listsize;}sqlist;void initiallist(sqlist *l)
2016-12-15 14:56:11 2066
原创 静态创建顺序表,并进行插入删除操作
程序代码:#include"stdio.h"#include<iostream>#include"stdlib.h"using namespace std;#define maxsize 10void insertelem(int sqlist[], int &n, int i, int item)//向长度为n的静态顺序表的第i个位置处插入元素item{ if (n == max
2016-12-15 11:20:52 806
AXI4_master_slave源码对应分析
2018-06-08
AXI4_Lite_master源码分析
2018-06-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人