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

Class DependencyGraphSize

source code

                            object --+    
                                     |    
base.semantics.distance.DistanceMetric --+
                                         |
                                        DependencyGraphSize

This is a baseline metric that does nothing clever. It's designed to show how well a system could do just by comparing the lengths of the two analyses in terms of the number of dependencies in them. We'd hope it wouldn't do very well, but it's an important baseline to try.

The distance is the inverse ratio between the lengths, always between 0 and 1.

Instance Methods [hide private]
 
distance(self, sem1, sem2)
Compares the two semantics instances and returns a float distance between them.
source code

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

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

Class Variables [hide private]
  OPTIONS = []
  name = 'depsize'
Properties [hide private]

Inherited from base.semantics.distance.DistanceMetric: identifier

Inherited from object: __class__

Method Details [hide private]

distance(self, sem1, sem2)

source code 

Compares the two semantics instances and returns a float distance between them.

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