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
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
chinmay 2013년 2월 27일
the thing is i have one project called HEART ANALYSIS USING NEURAL NETWROK.....but i dont understand in that how they train the data by neural network?????

댓글을 달려면 로그인하십시오.

 채택된 답변

Greg Heath
Greg Heath 2013년 2월 27일

1 개 추천

I've got a better idea:
1. What is size(x8)?
2. Why don't you tell us what you think the names of the different parameters and variables represent.
3. Add as many comments as you can regarding what you think each part of the code is doing
4. Add questions where you are not sure what the code is doing.
Greg

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

2013년 2월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by