Message Boards Message Boards

0
|
203 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Using recurrent layer in neural network

Hello
I am new to machine learning models
I use the Classify and other instructions quite well
But I have difficulties with neural networks

I have a training set of 36 examples that is presented in the following form

training={{0.105, 0.92, -1.5} -> 2.69, {-0.04, 0.4, -1.3} -> 
  7.2, {-0.112, -0.36, -1.2} -> 8.18, {-0.137, 0.73, -1.2} -> 
  9.02, {-0.065, -0.59, -1.1} -> 15.29, {-0.049, -0.06, -0.9} -> 
  19.85, {-0.062, -1.26, -0.5} -> 20.97, {0.014, -0.05, -0.4} -> 
  19.07, {0.003, 0.25, -0.4} -> 14.94, {-0.097, 0.85, -0.4} -> 
  11.28, {0.073, -1.26, -0.6} -> 7.78, {0.082, -1.02, -0.8} -> 
  0.75, {0.096, 0.08, -0.8} -> 5.14, {-0.008, 0.7, -0.5} -> 
  5.22, {0.006, -1.02, -0.2} -> 6.34, {0.162, -0.22, 0.2} -> 
  9.97, {0.166, -0.59, 0.4} -> 12.19, {0.283, -1.64, 0.6} -> 
  16.34, {0.415, 1.37, 0.7} -> 18.77, {0.297, -0.22, 0.9} -> 
  17.58, {0.243, -1.36, 1.} -> 16.87, {0.252, 1.87, 1.2} -> 
  10.4, {0.168, -0.39, 1.} -> 8.98, {0.168, 1.32, 0.8} -> 
  4.76, {0.165, 0.93, 0.5} -> 2.5, {0.176, -0.83, 0.4} -> 
  2.4, {0.224, -1.49, 0.3} -> 9.03, {0.184, 1.01, 0.3} -> 
  12.3, {0.174, -1.12, 0.2} -> 15.07, {0.376, -0.4, 0.} -> 
  18.43, {0.366, -0.09, -0.1} -> 21.26, {0.397, -0.28, 0.} -> 
  19.59, {0.355, -0.54, 0.2} -> 12.83, {0.348, -0.73, 0.1} -> 
  11.01, {0.244, -1.13, 0.} -> 5.27, {0.334, -0.43, 0.1} -> 3.44}

When I use a LinearLayer[] with the following instructions everything is OK

model = NetTrain[LinearLayer[], trainingset]

And now I have a good result on a test set

model[oscil12[[3]]]

The result is : 10.07

But if I use a recurrent layer, for example BasicRecurrentLayer, and I initialize it,

netL = NetInitialize[BasicRecurrentLayer[1, "Input" -> {"Varying", 3}]]
model = NetTrain[netL, trainingset]

I do not have the right result

Question 1 : Why?, my netL is incomplete? What layer I must add? SigmoidLayer or other active or output layer?
Question 2 : What is the simpler solution?
Question 3 : When I agree with my model, can I include this model in Predict[] instruction if I choose NeuralNetwork method

Thanks for your attention

POSTED BY: André Dauphiné
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract