Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the way to feed multidimensional input data to encog ANN in java?

I am trying to feed some input (IP) v/s ideal (ID) data to encog neural network (BasicNetwork class). All the tutorials show the input format (MLData) to be like this:

IP11,IP12,IP13        ID11,ID12
IP21,IP22,IP23        ID21,ID22
some more values...

But I want to feed the data like this:

IP11,IP12,IP13
IP21,IP22,IP23        ID11,ID12

IP11,IP12,IP13
IP21,IP22,IP23        ID21,ID22

Basically I intend to associate a matrix of input values with an array of ideal values. Is there a way to do that using the encog framework?

Eagerly awaiting reply.

like image 224
NRPanda Avatar asked Apr 25 '15 14:04

NRPanda


1 Answers

Nearly all machine learning models, neural networks included, accept a vector (one dimension) input. The only way to represent such 2D (or higher dimensional) data to the BasicNetwork (in Encog) is to flatten the matrix to a vector. A 8x8 matrix would be a 64-element vector. For a traditional feedforward neural network (BasicNetwork), it would not matter what part of the matrix maps to what element in the input vector. The fact that input #3 and input #4 are next to each other does not matter, they are all separate.

like image 52
JeffHeaton Avatar answered Sep 25 '22 16:09

JeffHeaton