-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathffnnetpredict.m
More file actions
31 lines (29 loc) · 1.21 KB
/
ffnnetpredict.m
File metadata and controls
31 lines (29 loc) · 1.21 KB
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Alkim GOKCEN - Contact: [email protected],
% FeedForwardNeuralNetwork [email protected],
% University of Izmir Katip Celebi, Institute of Applied Sciences, EEE
% Baylan Watermeters, Research & Development Department
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Syntax ------------------------------------------------------------------
% ** X is a matrix in size of MxN where M is the # of feature,N is the
% % of sample
% ** Win represents weights of input layer
% ** Wout represents weights of output layer
% ** bin represents bias values hidden layer neurons
% ** bout represents bias value of output layer neurons
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [prediction] = ffnnetpredict(X, Win, Wout, bin, bout)
netin = Win*X + bin;
netout = Wout*h(netin) + bout;
prediction = hOut(netout);
function y = h(x)
y = tansig(x);
end
function y = hOut(x)
y = x;
end
function y = hprime(x)
y = (1-tansig(x).^2);
end
end