diva.sketch.toolbox
Class LLRSceneMetric
java.lang.Object
diva.sketch.toolbox.LLRSceneMetric
- All Implemented Interfaces:
- SceneMetric
public class LLRSceneMetric
- extends Object
- implements SceneMetric
A scene metric that calculates the accuracy based on the
accuracy of the terminal assignments, where a terminal
is the direct parent of the stroke in the highest confidence
scene interpretation.
# of incorrect terminals / total # of terminals
- Version:
- $Revision: 1.3 $
- Author:
- Michael Shilman (michaels@eecs.berkeley.edu)
Method Summary |
double |
apply(Scene db1,
Scene db2)
Return a similarity metric based only on the LLR (terminal)
values of the test and reference databases: |
String |
getName()
The name of this metric is "llr" |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LLRSceneMetric
public LLRSceneMetric()
getName
public String getName()
- The name of this metric is "llr"
- Specified by:
getName
in interface SceneMetric
apply
public double apply(Scene db1,
Scene db2)
- Return a similarity metric based only on the LLR (terminal)
values of the test and reference databases:
# of incorrect terminals / total # of terminals
Assumes that the two scenes are composed of the
same number of strokes in the same order.
- Specified by:
apply
in interface SceneMetric
- Throws:
IllegalArgumentException
- If the scene is empty,
if the two scenes have different numbers of strokes, or
if either scene does not have a root that covers all of
its strokes.
Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.