Package jazzparser :: Package formalisms :: Package music_halfspan :: Package semantics :: Module distance :: Class DependencyRecovery
[hide private]
[frames] | no frames]

Class DependencyRecovery

source code

                            object --+        
                                     |        
base.semantics.distance.DistanceMetric --+    
                                         |    
      base.semantics.distance.FScoreMetric --+
                                             |
                                            DependencyRecovery

Exact dependency recovery metric. Only matches two nodes to each other if they have the same time attached to them. This is for use with results where we know the input is the same as that over which the gold standard is defined.

For example, evaluating chord sequence parsing against the corpus we know this. It won't work, however, evaluating midi parsing against the chord corpus.

It is also not pitch-independent, since it's only useful where the input over which the result was produced is the same anyway.

Instance Methods [hide private]
 
_get_identifier(self)
A human-readable identifier for the metric represented by this instance.
source code
 
fscore_match(self, sem1, sem2)
Subclasses must provide this.
source code

Inherited from base.semantics.distance.FScoreMetric: distance, format_distance, total_distance

Inherited from base.semantics.distance.DistanceMetric: __init__, print_computation

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  name = 'deprec'

Inherited from base.semantics.distance.FScoreMetric: OPTIONS

Properties [hide private]
  identifier
A human-readable identifier for the metric represented by this instance.

Inherited from object: __class__

Method Details [hide private]

_get_identifier(self)

source code 

A human-readable identifier for the metric represented by this instance.

Overrides: base.semantics.distance.DistanceMetric._get_identifier
(inherited documentation)

fscore_match(self, sem1, sem2)

source code 

Subclasses must provide this. It should return a tuple. The first three values must be floats: score given to the matching between the two inputs; max score that could be given to the first; max score for the second. There may be more values in the tuple.

Overrides: base.semantics.distance.FScoreMetric.fscore_match
(inherited documentation)

Property Details [hide private]

identifier

A human-readable identifier for the metric represented by this instance.

Get Method:
_get_identifier(self) - A human-readable identifier for the metric represented by this instance.