资源简介
Tax svdd matlab 带公式推导
代码片段和文件信息
% 函数KernelMatrix
% 最后生成的核矩阵在KM里面保存
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [KM] = KernelMatrix(TrainMatrixSigma)
% 求解训练矩阵的大小
[RowsColumns] = size(TrainMatrix);
%fprintf(1‘Total %d points in %d dimensions\n‘RowsColumns);
% 生成一个大小为样本点个数相同的0方阵列
%KM = zeros(RowsRows)
% N为核矩阵上三角的个数,因为核矩阵是对称的,所以只要给上三角赋值就可了
%N = (Rows*Rows-Rows)/2+Rows;
for i=1:Rows
for j=1:Rows
s = TrainMatrix(i:) - TrainMatrix(j:);
t = norm(s);
KM(ij) = exp(-(t^2)/(Sigma^2));
end
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 339 2009-12-15 16:24 Tax SVDD\data\data1.txt
文件 2821 2009-12-08 10:49 Tax SVDD\data\data2.txt
文件 1188 2009-12-14 16:04 Tax SVDD\data\data3.txt
文件 456 2009-12-08 15:30 Tax SVDD\data\data4.txt
文件 804 2009-12-09 14:35 Tax SVDD\data\data5.txt
文件 846 2009-12-13 14:42 Tax SVDD\data\data6.txt
文件 153 2009-12-09 16:06 Tax SVDD\data\data7.txt
文件 634 2009-09-03 17:52 Tax SVDD\KernelMatrix.m
文件 764 2009-12-14 15:47 Tax SVDD\myplot.asv
文件 764 2009-11-25 20:44 Tax SVDD\myplot.m
文件 789 2009-11-25 16:22 Tax SVDD\predict.m
文件 1164 2009-11-25 19:59 Tax SVDD\ReadTest.m
文件 712 2009-11-25 20:36 Tax SVDD\SVDD.asv
文件 889 2009-12-19 10:13 Tax SVDD\SVDD.m
文件 554 2009-11-25 19:12 Tax SVDD\svdd_select_sets.m
文件 1776 2009-11-25 19:12 Tax SVDD\svdd_solve.m
目录 0 2009-12-19 10:13 Tax SVDD\data
目录 0 2009-12-19 10:14 Tax SVDD
文件 203776 2009-12-19 10:16 svdd.doc
----------- --------- ---------- ----- ----
218429 19
评论
共有 条评论