machine learning - Encog Neural Network - How to actually run testing data -


i've been able train network, , gotten trained down minimal error want...

i don't see anywhere, when looked through guide book, how test trained network on new data... split part of training data apart can test network's results on untrained data since i'm using classification. here code i've got, not sure mldata output. classification, want take output neuron highest value... aka, correct classification node.

    mldataset testingset = new basicmldataset(testingtraining, testingideal);     system.out.println("test results:");     for(mldatapair pair: testingset ) {         final mldata output = network.compute(pair.getinput());         //what do output?     } 

(my testing data tagged correct classifications...)

well depends on problem have @ hand, idea output should close possible test dataset output, suggest comparing that. example, if classification task, output iterable , should able work out selected output class , compare target. can work out misclassification rate, or other measure of accuracy (precision, recall, f1-score..). like:

int bad = 0; for(mldatapair pair: testingset) {     mldata output = network.compute(pair.getinput());     if(outputclass(output) != outputclass(pair.getideal()))         bad++; } double misclassificationrate = bad / testingset.size() 

you have write outputclass appropriately returns classification output, of course. regression can similar, instead of mapping looking @ distance measure between 2 outputs work out error.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -