0

I am using newff for stock price forecasting project, I am trying to setup a Back-propagation feed forward ANN of 4 inputs, 1 hidden layers and 1 output layer (4-1-1). I have read many forums to learn how to correctly specify these parameters for newff, however almost every forum/post just copy/paste the matlab newff definition (That I am not able to understand as I am new to matlab and neural networks). Can someone please just let me know how to setup a 4-1-1 ANN using newff?

Jesse
  • 8,605
  • 7
  • 47
  • 57
Shoaib Khan
  • 1
  • 1
  • 1

1 Answers1

0

Example:

input = [0.1 0.8; 0.1 0.75; 0.01 0.8; 0.5 0.6]; 
output = [1 2];
nbHiddenNeurons = 1;
net = newff(input, output, nbHiddenNeurons);

This will give you a 4-1-1 ANN using newff.

enter image description here

Note: newff() was obsoleted in R2010b NNET 7.0. Now the recommended function is feedforwardnet.

Franck Dernoncourt
  • 77,520
  • 72
  • 342
  • 501