7.00.02 - Calculating Prediction Accuracy - Aster Analytics

Teradata Aster® Analytics Foundation User GuideUpdate 2

Product
Aster Analytics
Release Number
7.00.02
Release Date
September 2017
Content Type
Programming Reference
User Guide
Publication ID
B700-1022-700K
Language
English (United States)
For a classification problem, you can calculate the prediction accuracy, or misclassification error. Because the NeuralNet function prediction is numeric, you must first transform the numeric values in the predictOut_0 column into classes. For example, if predictOut_0 > 3, the predicted class is 4.
  1. Transform the numeric values into classes:
    UPDATE nn_bc_predict SET "predictOut_0" = 2 WHERE "predictOut_0" < 3;
    UPDATE nn_bc_predict SET "predictOut_0" = 4 WHERE "predictOut_0" > 3;
  2. Display the number of correct classifications:
    SELECT count(*) FROM nn_bc_predict WHERE "predictOut_0" = class;
    count(1) 
    ----------
    205
    (1 row)
  3. Display the total number of classifications:
    SELECT count(*) FROM nn_bc_predict;
    count(1) 
    ----------
    210
    (1 row)
  4. Calculate the prediction accuracy: 205/210 = 97.6%