资源简介
基于核主元分析(KPCA)的工业过程故障检测,代码已优化,运行效率高,有详细的注释,附有训练数据和测试数据。

代码片段和文件信息
function [K] = computeKernelMatrix(kerxy)
% Calculate kernel function.
%
% x: 输入样本d×n1的矩阵n1为样本个数d为样本维数
% y: 输入样本d×n2的矩阵n2为样本个数d为样本维数
%
% ker 核参数(结构体变量)
% the following fields:
% type - linear : k(xy) = x‘*y
% poly : k(xy) = (x‘*y+c)^d
% gauss : k(xy) = exp(-0.5*(norm(x-y)/s)^2)
% tanh : k(xy) = tanh(g*x‘*y+c)
% degree - Degree d of polynomial kernel (positive scalar).
% offset - Offset c of polynomial and tanh kernel (scalar negative for tanh).
% width - Width s of Gauss kernel (positive scalar).
% gamma - Slope g of the tanh kernel (positive scalar).
%
% ker = struct(‘type‘‘linear‘);
% ker = struct(‘type‘‘ploy‘‘degree‘d‘offset‘c);
% ker = struct(‘type‘‘gauss‘‘width‘s);
% ker = struct(‘type‘‘tanh‘‘gamma‘g‘offset‘c);
%
% K: 输出核参数n1×n2的矩阵
%-------------------------------------------------------------%
switch ker.type
case ‘linear‘
K = x*y‘;
case ‘ploy‘
d = ker.degree;
c = ker.offset;
K = (x‘*y+c).^d;
case ‘gauss‘
s = ker.width;
sx = sum(x.^22);
sy = sum(y.^22);
K = exp(0.5*(bsxfun(@minusbsxfun(@minus2*x*y‘sx)sy‘))/s^2);
case ‘tanh‘
g = ker.gamma;
c = ker.offset;
K = tanh(g*x‘*y+c);
otherwise
K = 0;
end
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1451 2018-03-17 09:23 computeKernelMatrix.m
文件 3220 2018-03-17 09:22 main.m
文件 27697 2018-03-17 08:47 testData.mat
文件 27448 2018-03-17 08:48 trainData.mat
- 上一篇:基于51单片机的天然气报警器的设计
- 下一篇:基于uml的网上订餐系统
相关资源
- 基于φ—OTDR技术的带式输送机托
- 带式输送机托辊故障检测方法
- 碳膜电位器故障检测方法_碳膜电位器
- 论文研究-不确定时滞的无线网络控制
- 辐射和光场的量子统计理论-曹昌祺
- 齿轮箱数据及说明.rar
- 过程控制课程设计资料\\工业过程控制
- 控制系统的故障检测与诊断技术
- 基于滑模的故障检测与容错控制-英文
- 基于labview的火车故障检测系统
- 10kV配电网故障检测方法研究
- 支持向量数据描述Support Vector Data De
- 2019_全国大学生电子设计大赛_C题_线路
- 组合导航系统故障检测技术研究
- 模型不确定性线性系统的鲁棒故障检
- ICA故障检测与诊断
- BP神经网路的变压器故障检测.zip
- 电机振动故障检测tensorflow神经网络
- 2019年电赛C题_线路负载及故障检测装
- 简单RBF分类算法
- 利用核主元分析Kernel principal componen
评论
共有 条评论