urm... the minimum info. needed to get three 2D arrays from a single string

Sorry... if there was enough space ot would say...

"What is the minimum set of data required to extract three 2D arrays from a single string of values?"

In particular when these arrays are designed and used for matracies caluculations.

More specificaly when these matrices represnt the connections within a neural network. This is important as the width of the first matrix is also the depth/height of the second. And the width of the second matrix is the depth of the third.

Just so we don't get confused with which dimension is which... it's this way round..

float theMatrix =newfloat[width][depth]

Obvioulsy you need to know some information about how to split the string up into the right shapes but how little information can we get away with?

I really don't have much of a clue. Even knowing the proper name for this type of problem would be really useful ;)

Kind Regards

Adam

[1048 byte] By [adamgreen19a] at [2007-10-1 10:28:09]
# 1
Think of how matrices are stored in languages like C and Fortran. The rows or columns are packed into a single long array of length rows * columns. To be of any use you need to know the number of rows and columns, or if you know the total length of the array, you only need one of those.
RadcliffePikea at 2007-7-10 2:55:32 > top of Java-index,Other Topics,Algorithms...
# 2

<quote>Think of how matrices are stored in languages like C and Fortran. The rows or columns are packed into a single long array of length rows * columns </quote>

Indeed ;) But then to store information about three of these you need to concenate (sp?) them into one string. Also, each matrix isn't necessarily the same size.

Each of these can be of a different length. So we have:

String.length = (widthOne * depthOne) + (widthTwo * depthTwo) + (widthThree * depthThree)

Personally I think I need only the width of each matrix and also the depth of any one of them is needed , the first one's easiest to contemplate.

This simplifies to:

String.length = (widthOne * depthOne) + (widthTwo* widthOne) + (widthTwo * widthThree)

Okay, so we can do it with four values. Can we do it with three though? Or even just 2?

Actually, we are given the total number of elements in the string as we can count them. This data item we can consider 'free'.

And possibly also the number of matrices.(sometime NN's down't have three layers. In fact the simplest NN is one layer with one node in which case the string is one element long. Hence in this situation absolutely no information is needed, it all falls out by itself as everyting tends to unity). Although from a Java point of view this information could be a 'freebie', I'm not sure if from a philosophical point of view it is at all valid....

Kind Regards,

Adam

adamgreen19a at 2007-7-10 2:55:32 > top of Java-index,Other Topics,Algorithms...
# 3

Ah, I missed the three arrays part. Sure, if you've got a chain of n multiplicatively comforatble matrices, then you get n-1 pieces of information free. But this amount of information is vanishingly small compared to the information stored in the arrays. Why bother? Why not choose a serialization format that is robust and reusable for all different kinds of arrays.?

RadcliffePikea at 2007-7-10 2:55:32 > top of Java-index,Other Topics,Algorithms...
# 4

Well,

It's important that the weights of the system (the value in each matrix cell/element is a weight) must be stored as a single string.

In my application I use Genetic Algorithms, so this information must be kept in one -single- chromosome.

I'm trying to work out how much apriory information is required for this chromosome to make sence as the development process from string/chromosome to matrices/network should be as abstract as possible.

Thanks for your input though!

Adam

adamgreen19a at 2007-7-10 2:55:32 > top of Java-index,Other Topics,Algorithms...
# 5

Can the system actually do something meaningful if the matrices sizes mutate? In effect you're varying the length of your chromosome if you're doing that.

Can the system cope if the mutated sizes say they are different from the amount of data - say you have a 10*10 matrix but the size value gets mutated to say its 1e8*10 - what will happen?

It may be you only want to mutate the data in the matrices, not the metadata describing the matrix layout.

Pete

pm_kirkhama at 2007-7-10 2:55:32 > top of Java-index,Other Topics,Algorithms...
# 6

<It may be you only want to mutate the data in the matrices, not the metadata describing the matrix layout.>

Indeed. thats eactly it. Although a GA *could* be derived which adds/deletes nodes from the system (changing the size of the matrix) . i think there are some work arounds to ensure these additions/deletion appeared within some larger 'maximum subset'. IE the matrices defined by the chromosome are smaller than this max. subset. Hopefully that would solve some problems. Althouh it would limit our GA, it would open a window on "architectureal genetic algorithms" as oppose to messing around with the weights.

I still say I need to know how many layers, and the number of nodes in each one before you can start decoding non trivial chromosomes. Anyone have a different opinion?

Kind Regrds - it's a nice sunny saturday here

Adam

adamgreen19a at 2007-7-10 2:55:32 > top of Java-index,Other Topics,Algorithms...