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

Class RandomDistance

source code

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

Returns a distance by picking a random number. This is useful for establishing a random baseline on evaluations. Obviously it won't be the same for two calls on the same inputs.

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 = 'rand'
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)