Help in Neural network Coding?

2 views (last 30 days)
Ghalia Al-Alawi
Ghalia Al-Alawi on 3 Nov 2014
Commented: Oman Wisni on 22 Nov 2018
Good Afternoon I'm new to neural network and MATLAB. I'm try to make neural network to predict Core Facies (e.g. I have 8 facies) in oil field from wireline log (10 wireline logs).
I have many questions and i would be appreciate if someone can help me.
First, How to structure or format my input and output data to be loaded into MatLab? Which type of neural network should I use? Before runing the ANN, how can I rank my wireline log to selected as my input? Finally, the number of target/output, will be 8 outputs of it will be only one?
I would be appreciate any answer.
Regards, Ghalia

Accepted Answer

Greg Heath
Greg Heath on 4 Nov 2014
[ I N ] = size(input) % I = 10
[ O N ] = size(target) % O = 8
% Find h by trial and error to minimize MSE
net = fitnet(h);
[ net tr y e ] = train(net,input,target); % e=target-y
MSE = mse(e)
For details search
greg fitnet Ntrials
Hope this helps
Thank you for formally accepting my answer
Greg

More Answers (2)

Greg Heath
Greg Heath on 16 Nov 2014
You are correct: Use patternnet for classification/pattern-recognition.
Sorry for the oversight. Number of classes c = 8
[ I N ] = size(input) % I = 10
[ c N ] = size(target) % c = 8
Columns of target are {0,1} unit vectors with
target = ind2vec(trueclassindices)
sum(target) = ones(1,N)
where
trueclassindices = vec2ind(target)
% Find H by trial and error to minimize MSE (error rates are not differentiable)
net = patternnet(h)
[ net tr y e ] = train(net,input,target); % e=target-y
MSE = mse(e)
predictedclassindices = vec2ind(y)
totalerrors = predictedclassindices~= trueclassindices; %{0,1}vector
% From this (0,1) vector individual class errors can be obtained. Additional info can be obtained from the training record tr.
For details search
greg patternnet Ntrials
Hope this helps
Greg
  1 Comment
Oman Wisni
Oman Wisni on 22 Nov 2018
Hi, I have input = 220x25 and target = 220x1
I'm trying follow your this code
[ I N ] = size(input)
[ O N ] = size(target)
But the resul I got is N = 1, N = 220, O = 220. this is right ?

Sign in to comment.


Ghalia Al-Alawi
Ghalia Al-Alawi on 15 Nov 2014
thanks for your reply. But which neural net should I use for the prediction since I want to predict these facies in uncored wells. Should I use fitnet or pattannet?
Regards, Ghalia

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!