⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 opt_sphere.m

📁 wekaUT是 university texas austin 开发的基于weka的半指导学习(semi supervised learning)的分类器
💻 M
字号:
function A = opt_sphere(X, S, D, maxiter)

% Preprocessing: First sphere the data
sphereMult = cov(X)^-0.5;
sphereX = X*sphereMult;

s = size(sphereX);
N = s(1);     % number of examples
d = s(2);     % dimensionality of examples            

A = eye(d,d)*0.1;
W = zeros(d,d);

for i = 1:N,
  for j = i+1:N,
    if S(i,j) == 1,
      d_ij = sphereX(i,:) - sphereX(j,:);
      W = W + d_ij'*d_ij;
    end;
  end;
end;     

w = unroll(W);
t = w' * unroll(A)/100;

[A, converge] = iter_projection_new2(sphereX, S, D, A, w, t, maxiter);
  
% Now unsphere the distance metric so that we get a version
% for the original, unsphered data.

unspheredA = inv(sphereMult)*A*inv(sphereMult);

A = unspheredA;



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -