Package jazzparser :: Package formalisms :: Package music_halfspan :: Class Formalism :: Class Evaluation
[hide private]
[frames] | no frames]

Class Evaluation

source code

FormalismBase.Evaluation --+
                           |
                          Formalism.Evaluation

Functions for evaluating tonal space paths and parse results.

Static Methods [hide private]
 
tonal_space_alignment_costs(sem1, sem2)
Performs an alignment of two tonal space paths and returns a dictionary of costs incurred in the optimal alignment.
source code
 
tonal_space_distance(sem1, sem2)
Performs an alignment of two tonal space paths and computes a distance metric between them.
source code
 
tonal_space_f_score(sem, gold_sem)
Calculates an f-score for the optimal alignment between the sequence and the gold standard sequence.
source code
 
tonal_space_alignment_score(seq1, seq2)
Assigns a score to the optimal alignment between the two logical forms.
source code
 
tonal_space_alignment(sem1, sem2, distance=False)
Performs the same algorithm as tonal_space_distance and tonal_space_alignment_costs, but returns a list of the operations that produce the optimal alignment: "I" - insertion; "D" - deletion; "A" - alignment; "S" - full substitution; or anything else beginning with "S" to indicate a partial substitution.
source code
 
tonal_space_length(sem)
Number of points on the tonal space path represented by the semantics
source code
Method Details [hide private]

tonal_space_alignment_costs(sem1, sem2)
Static Method

source code 

Performs an alignment of two tonal space paths and returns a dictionary of costs incurred in the optimal alignment. The values must include 'deletions', 'substitutions' and 'insertions' and may also include more fine-grained information, like 'root_subs' and 'function_subs'.

Overrides: tonal_space_alignment_costs

tonal_space_distance(sem1, sem2)
Static Method

source code 

Performs an alignment of two tonal space paths and computes a distance metric between them. The metric is assumed to be based on edit distance, so to have a minimum value of 0 (identity) and maximum the length of the longer sequence.

Overrides: tonal_space_distance

tonal_space_alignment_score(seq1, seq2)
Static Method

source code 

Assigns a score to the optimal alignment between the two logical forms.

Think of this as essentially a count of alignments in the optimal alignment. In fact, a pair of points may be partly aligned, in which case they contribute something to this score between 0 and 1.

tonal_space_alignment(sem1, sem2, distance=False)
Static Method

source code 

Performs the same algorithm as tonal_space_distance and tonal_space_alignment_costs, but returns a list of the operations that produce the optimal alignment: "I" - insertion; "D" - deletion; "A" - alignment; "S" - full substitution; or anything else beginning with "S" to indicate a partial substitution.

Returns the operation list and the two sequences that were compared. If distance=True, also includes the distance metric. Not included by default for backward compatibility.

tonal_space_length(sem)
Static Method

source code 

Number of points on the tonal space path represented by the semantics