-
Notifications
You must be signed in to change notification settings - Fork 0
/
training.m
35 lines (35 loc) · 899 Bytes
/
training.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% 0 malignant/cancerous
% 1 normal
nI = 307;
nH = 4;
nF = 8;
%avgError = zeros(18,1);
avgError = 0;
%for nH = 1:18
%x = zeroes(nI,nF);
x = xlsread('E:\IIT Roorkee\IOP (RTCoMU)\Training\features_train.xlsx', 4);
x=x';
%d = zeroes(nI,1);
d = xlsread('E:\IIT Roorkee\IOP (RTCoMU)\Training\features_train.xlsx', 3);
d=d';
% for i=1:nI
% for j=1:nF
% x(i,j)=data{i,j};
% end
% d(i,1)=output{i,1};
% end
net=newff(x,d,nH);
net=train(net,x,d);
output=net(x);
error=output-d;
% avgError(nH)=0;
% for i=1:nI
% avgError=avgError+abs(error(i));
% end
% avgError=avgError/nI;
%end
% y = xlsread('E:\IIT Roorkee\IOP (RTCoMU)\Training\features_train.xlsx', 7);
% y = y';
% d2 = net(y);
% d2 = d2';
% xlswrite('E:\IIT Roorkee\IOP (RTCoMU)\Training\testing.xlsx',d2,1,'B1:B87');