使用 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 (将#修改为@)