微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

使用 matlab 对威斯康星州乳腺癌进行自动相关性确定 (ARD)

如何解决使用 matlab 对威斯康星州乳腺癌进行自动相关性确定 (ARD)

我想使用包含 400 个训练数据和 30 个输入的 Breast Cancer Wisconsin 数据集。 我想使用 ARD 找出哪些输入最相关。我尝试使用 demard(netlab) 工具箱实现。

clc;clear;close all;

load('breast.mat');

% Set up network parameters.
nin = 30;           % Number of inputs.
nhidden = 2;            % Number of hidden units.
nout = 1;           % Number of outputs.
aw1 = 0.01*ones(1,nin);    % First-layer ARD hyperparameters.
ab1 = 0.01;         % Hyperparameter for hidden unit biases.
aw2 = 0.01;         % Hyperparameter for second-layer weights.
ab2 = 0.01;         % Hyperparameter for output unit biases.
beta = 50.0;        % Coefficient of data error.

% Create and initialize network.
prior = mlpprior(nin,nhidden,nout,aw1,ab1,aw2,ab2);
net = mlp(nin,'linear',prior,beta);

% Set up vector of options for the optimiser.
nouter = 1;         % Number of outer loops
ninner = 30;                % Number of inner loops
options = zeros(1,18);      % Default options vector.
options(1) = 1;         % This provides display of error values.
options(2) = 1.0e-7;    % This ensures that convergence must occur
options(3) = 1.0e-7;
options(14) = 300;      % Number of training cycles in inner loop. 

% Train using scaled conjugate gradients,re-estimating alpha and beta.
for k = 1:nouter
  net = netopt(net,options,trainset,labels_train,'scg');
  [net,gamma] = evidence(net,ninner);
  fprintf(1,'\n\nRe-estimation cycle %d:\n',k);
  fprintf(1,'  alpha =  %8.5f\n',net.alpha);
  fprintf(1,'  beta  =  %8.5f\n',net.beta);
  fprintf(1,'  gamma =  %8.5f\n\n',gamma);
end

ad = net.alpha;

我对其中的含义有些怀疑,因为广告的大小是 33(通常应该是 30(输入次数))。 在这里,我想找出最相关的参数与 NN 的准确性。 如果你能从初学者的角度帮助我,我会很高兴。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。