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 ExchangeDeep Learning Toolbox についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by