twokpca.m
资源名称:KPCA.rar [点击查看]
上传用户:nxf103
上传日期:2017-12-04
资源大小:2690k
文件大小:0k
源码类别:
能源行业(电力石油煤炭)
开发平台:
Matlab
- function a=twokpca(test,train,i,p,new)
- n1=size(train,1);
- a=0;
- for j=1:n1
- a=a+(((train(j,i)-test(new,i))^2+(train(p,i)-test(new,i))^2)*onekpca(train(j,:),test(new,:))*onekpca(train(p,:),test(new,:)));
- end
- a=(1/n1)*a;