0% found this document useful (0 votes)
11 views2 pages

Exp 1

The document describes Experiment 1, which involves training a neural network using specific input data and a defined output function. The neural network is configured with a certain architecture and training parameters, and it is trained to minimize error in predictions. The results are presented in a table comparing actual values, ANN predictions, and the percentage error for each input set.

Uploaded by

Jeet Yagnik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Exp 1

The document describes Experiment 1, which involves training a neural network using specific input data and a defined output function. The neural network is configured with a certain architecture and training parameters, and it is trained to minimize error in predictions. The results are presented in a table comparing actual values, ANN predictions, and the percentage error for each input set.

Uploaded by

Jeet Yagnik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

EXPERIMENT: 1

EXPERIMENT 1
clc
clear all
inputs = [0.5 0.5 0.5; 0.8 0.8 0.8; 0.6 0.7 0.8; 0.5 0.2 0.3; 0.2 0.3 0.4];
I=rand(3,500);
Y=3*I(1,:)+5*I(2,:).^2+2*I(3,:);
N=newff(I,Y,[3 2 1],{'logsig','tansig','purelin'},'trainlm');
N=init(N);
N.trainParam.epochs=500;
N.trainParam.goal=1e-10;
N.trainParam.show=1;
N=train(N,I,Y);

for a = 1:length(inputs)
Actual(a,1) = 3*inputs(a,1)+5*inputs(a,2).^2+2*inputs(a,3); %actual
ANN(a,1) = sim(N,[inputs(a,1);inputs(a,2);inputs(a,3)]); %ann
Error(a,1) = (Actual(a,1) - ANN(a,1))*100/Actual(a,1);
end
plot(Actual(:,1),ANN(:,1));
legend(['Actual v/s ANN']);
xlabel('Actual');
ylabel('ANN');
output = table(Actual,ANN,Error)

output =

Actual ANN Error

3.75 3.7481 0.050161


7.2 7.2022 -0.030795
5.85 5.8508 -0.014032
2.3 2.3016 -0.071527
1.85 1.8509 -0.050353

You might also like