资源简介
SPXY样本划分法及蒙特卡罗交叉验证结合优化建模方程,达到最高精度。

代码片段和文件信息
%把所有的样本都看作训练集候选样本,依次从中挑选样本进训练集,首先选择欧氏距离最远的两个向量对进入训练集,在接下来的迭代过程中拥有最大最小距离的待选样本
%被选入训练库.以此类推,达到所要求的样本数目。
%该方法优点是能保证训练库中样本按照空间距离分布均匀。缺点是需要进行数据转换和计算样本两两空间距离,计算量大。
function [mdminmax] = KS(XN)
% Kennard-Stone Algorithm for selection of samples
% [mdminmax] = ks(XN);
%
% X --> Matrix of instrumental responses
% N --> Number of samples to be selected (minimum of 2)
%
% m --> Indexes of the selected samples
%
% dminmax(1) = 0;
% dminmax(2) = Euclidean distance between the two first samples selected by the algorithm
% dminmax(i) = Smallest distance between the i-th selected sample and the previously selected ones (i > 2)
dminmax = zeros(1N); % Initializes the vector of minimum distances
M = size(X1); % Number of rows in X (samples)
samples = 1:M;
D = zeros(MM); % Initializes the matrix of distances
for i=1:M-1
xa = X(i:);
for j = i+1:M
xb = X(j:);
D(ij) = norm(xa - xb);
end
end
% D: Upper Triangular Matrix
% D(ij) = Euclidean distance between objects i and j (j > i)
[maxDindex_row] = max(D); % maxD = Row vector containing the largest element of each column in D
% index_row(n) = Index of the row with the largest element in the n-th column
[dummyindex_column] = max(maxD); % index_column = column corresponding to the largest element in matrix D
m(1) = index_row(index_column);
m(2) = index_column;
dminmax(2) = D(m(1)m(2));
for i = 3:N
% This routine determines the distances between each sample still available for selection and each of the samples already selected
pool = setdiff(samplesm); % pool = Samples still available for selection
dmin = zeros(1M-i+1); % Initializes the vector of minimum distances between each sample in pool and the samples already selected
for j = 1:(M-i+1) % For each sample xa still available for selection
indexa = pool(j); % indexa = index of the j-th sample in pool (still available for selection)
d = zeros(1i-1); % Initializes the vector of distances between the j-th sample in pool and the samples already selected
for k = 1:(i-1) % The distance with respect to each sample already selected is analyzed
indexb = m(k); % indexb = index of the k-th sample already selected
if indexa < indexb
d(k) = D(indexaindexb);
else
d(k) = D(indexbindexa);
end
end
dmin(j) = min(d);
end
% The selected sample corresponds to the largest dmin
[dminmax(i)index] = max(dmin);
m(i) = pool(index);
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2780 2015-03-18 14:56 样本划分选择\KS.m
文件 543 2010-03-17 20:04 样本划分选择\RS.m
文件 3175 2010-03-17 20:58 样本划分选择\spxy.m
文件 296470 2010-03-17 20:00 样本划分选择\SPXY样本划分法及蒙特卡罗交叉验证结合近红外光谱用于橘叶中橙皮苷的含量测定.PDF
目录 0 2015-03-18 16:13 样本划分选择
----------- --------- ---------- ----- ----
302968 5
- 上一篇:河北工业大学计算机组成真题2018
- 下一篇:即时聊天小程序源码
相关资源
- 分治法快速排序算法QuickSort C
- VxWorks TCPIP协议栈
- Macromedia Fireworks V8.0 简体中文版
- Win7下安装Tornado2.2vxWorks5.5的方法
-
Differential ex
pression patterns of Toll-li - Vxworks下网卡驱动程序的开发
- 在B→→DK±中具有D→KS0&
-
li
nksys AE1000/Cisco AM10无线网卡驱动 - n.Software.IPWorks!.2016.V16.0.6446
- 全新惠普 StorageWorks DAT72X6自动加载磁
- 腾保数据RDX QuikStor 灵动存儲 - 耐用
- 腾保数据RDX QuikStor移动式磁带机
- 飞思卡尔68HC08Metrowerks_CodeWarrior开发软
- HP StorageWorks X9000网络存储系统解决方
- HP StorageWorks EVA存储系统 IT容灾解决方
- 惠普StorageWorks XP12000磁盘阵列
- HP StorageWroks MSA入门SAN方案简化存储
- HP StorageWorks X9000网络存储系统系列产
- HP惠普StorageWorks NAS 解决方案
- arcgis_workstation地址
- ArcGIS_ArcInfo_9.3_Workstation_DVD_BT
- HP StorageWorks助温州附二院架构现代医
- HP StorageWorks企业虚拟阵列EVA3000产品手
- HP StorageWorks 4400企业虚拟阵列产品说明
- HP StorageWorks 200存储虚拟化系统
- HP StorageWorks企业虚拟阵列集群产品技
- HP StorageWorks 1002i虚拟磁带库系统
- 连续极限Tonks-Girardeau矩阵元素。 第一
- 知识战略及西门子KSP方法和实践
- zynq-7000-vxworks-bsp.zip
评论
共有 条评论