You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This basic example program is the skeleton of a classification problem.
The training data should be in matrix form, where each row is a data point, and
each column is a feature.
The training classes should be in matrix form, where the ith row corresponds to
the ith training example, and each column is a 1 if it is of that class, and
0 otherwise. Each example may only be of 1 class.
This isn't clear to me. Let's say I have a training data set with 8 features
And I want them classified into 4 classes
Training - rows of eight columns one feature per column
1,2,3,4,5,6,7,8
6,2,3,4,7,6,5,4
6,2,3,4,4,5,5,4
3,4,7,6,5,4,3,2
2,3,4,5,6,4,3,3
Classifications - since I have four classes I would think this has 4 columns, each column indicating which class it is in
0,0,1,0
1,0,0,0
1,0,0,0
0,1,0,0
0,0,01
That's five rows and 4 columns. One column per class.
Create network would be:
createNetwork(8, 1, hiddenSizeReg, hiddenActivationsReg, 4, linear);
Network with 8 inputs 1 hidden layer and 4 outputs (1 per class)
But accuracy requires this:
assert(data->cols == network->layers[network->numLayers - 1]->size);
Can you give a better example?
Thanks
The text was updated successfully, but these errors were encountered:
This basic example program is the skeleton of a classification problem.
The training data should be in matrix form, where each row is a data point, and
each column is a feature.
The training classes should be in matrix form, where the ith row corresponds to
the ith training example, and each column is a 1 if it is of that class, and
0 otherwise. Each example may only be of 1 class.
This isn't clear to me. Let's say I have a training data set with 8 features
And I want them classified into 4 classes
Training - rows of eight columns one feature per column
1,2,3,4,5,6,7,8
6,2,3,4,7,6,5,4
6,2,3,4,4,5,5,4
3,4,7,6,5,4,3,2
2,3,4,5,6,4,3,3
Classifications - since I have four classes I would think this has 4 columns, each column indicating which class it is in
0,0,1,0
1,0,0,0
1,0,0,0
0,1,0,0
0,0,01
That's five rows and 4 columns. One column per class.
Create network would be:
createNetwork(8, 1, hiddenSizeReg, hiddenActivationsReg, 4, linear);
Network with 8 inputs 1 hidden layer and 4 outputs (1 per class)
But accuracy requires this:
assert(data->cols == network->layers[network->numLayers - 1]->size);
Can you give a better example?
Thanks
The text was updated successfully, but these errors were encountered: