June 2018
Intermediate to advanced
436 pages
10h 33m
English
To evaluate the network performance, I wrote the evaluateClassificationPerformance() method, which takes the test set and evalTimeSeries evaluation, as shown here:
private static void evaluateClassificationPerformance(MultiLayerNetwork net, int testStartIdx, int nExamples, DataSetIterator testData) throws Exception { Evaluation evaluation = new Evaluation(NUM_CLASSES); while(testData.hasNext()) { DataSet dsTest = testData.next(); INDArray predicted = net.output(dsTest.getFeatureMatrix(), false); INDArray actual = dsTest.getLabels(); evaluation.evalTimeSeries(actual, predicted); } System.out.println(evaluation.stats());}
>>> Predictions labeled as 0 classified by model as 0: 493 times Predictions labeled as 0 classified ...Read now
Unlock full access