can anyone explain me this code??
이전 댓글 표시
x5;
x8=load('hearttest.txt');
c4=size(x8)*[1;0];%calculating size of matrix.
u1=size(x8)*[0;1];
x6=x8;
%==========================================================
per=80;
per1=20;
al=0.1;
pe=per/100;
v=round(pe*c3);
%==========================================================
%
%==================================================================
%separating the input attributes and the target from the input file
%==================================================================
%Reading input in an array
for s1=1:m
for i=1:c3
if(x5(i,u)==(s1-1))
for(j=1:u)
temp=x5(s1,j);
x5(s1,j)=x5(i,j);
x5(i,j)=temp;
end
end
end
end
%==================================================================
%==================================================================
%TARGET CLASS vectors
%
for i=1:c3
for j=1:u
if((j==u))
t(i)=x5(i,j);
end
end
end
%==================================================================
for i=1:c3
for j=1:u-1
x(i,j)=x5(i,j);
end
end
%==================================================================
%INPUT vectors
for i=1:c3
for j=1:u-1
if x(i,j)==0
x(i,j)=.05;
end
end
end
%==================================================================
%==================================================================
%Normalizing the datas.
q2=size(x)*[0;1];
p2=size(x)*[1;0];
y=max(x,[],1);
z=min(x,[],1);
for i=1:q2
if y(i)~=z(i)
e(i)=y(i)-z(i);
else
e(i)=1;
z(i)=0;
end
end
for i=1:p2
for j=1:q2
x(i,j)=(x5(i,j)- z(j))/(e(j));
end
end
x8;
q5=size(x8)*[0;1];
p5=size(x8)*[1;0];
y=max(x8,[],1);
z=min(x8,[],1);
for i=1:q5
if y(i)~=z(i)
e(i)=y(i)-z(i);
else
e(i)=1;
z(i)=0;
end
end
for i=1:p5
for j=1:q5
x8(i,j)=(x8(i,j)- z(j))/(e(j));
end
end
x8;
%==================================================================
%==================================================================
%STEP1:
%Initialising then weight matrix.
%==================================================================
for i=1:u-1
for j=1:4
w(i,j)=x(j,i);
end
end
댓글 수: 2
Azzi Abdelmalek
2013년 2월 27일
Can your question be more precise? because I don't see how is it possible to explain all these lines of code.
chinmay
2013년 2월 27일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!