Next: Printing Survived Stacks, Previous: Output Fields, Up: pcfg-predict-eval [Contents][Index]
Use the option --intermediate to get details about calculating an upper bound on the number of correctly predicted terminal symbols when processing every terminal symbol from an actual and predicted terminal symbol sequence. Example:
$ pcfg-predict-eval --intermediate predict_eval.pcfg actual.seq predicted.seq step 0: actual "a", predicted "a", prob_max 1.00000000, npredict 1, wpredict_max 1.00000000 step 1: actual "c", predicted "c", prob_max 0.50000000, npredict 2, wpredict_max 1.50000000 step 2: actual "c", predicted "b", prob_max 1.00000000, npredict 2, wpredict_max 2.50000000 step 3: actual "d", predicted "d", prob_max 1.00000000, npredict 3, wpredict_max 3.50000000 step 4: actual "a", predicted "a", prob_max 1.00000000, npredict 4, wpredict_max 4.50000000 step 5: actual "b", predicted "d", prob_max 0.50000000, npredict 4, wpredict_max 5.00000000 step 6: actual "d", predicted "d", prob_max 1.00000000, npredict 5, wpredict_max 6.00000000 { "seq_len" : 7, "wpredict_max" : 6.00000000, "npredict_actual" : 5, "prob_wpredict_max" : 0.85714286, "prob_npredict_actual" : 0.71428571 }
For every pair of terminal symbols read from the actual and predicted terminal symbol sequence, the program prints a line with the following fields:
step
The index (position) of a terminal symbol in the actual or predicted terminal symbol sequence. The indices start with 0.
actual
A terminal symbol read from the actual terminal symbol sequence.
predicted
A terminal symbol read from the predicted terminal symbol sequence.
prob_max
The probability of correct prediction of a terminal symbol in the field actual
based on all previous terminal symbols read from the actual terminal symbol sequence.
npredict
The number of times terminal symbols in the fields actual
and predicted
were equal (up to the current line).
wpredict_max
The sum of prob_max
fields up to the current line.
Next: Printing Survived Stacks, Previous: Output Fields, Up: pcfg-predict-eval [Contents][Index]