|
|
__init__(self,
initial_key_dist,
initial_chord_dist,
key_transition_dist,
chord_transition_dist,
emission_dist,
note_number_dist,
chord_vocab,
max_notes,
chord_corpus_mapping,
history='',
description='',
name='default')
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
copy(self,
mutable=False)
Creates a complete copy of the model, optionally making the
distributions mutable. |
source code
|
|
|
|
|
|
|
add_history(self,
string)
Adds a line to the end of this model's history string. |
source code
|
|
|
|
get_mapping_to_corpus(self)
Returns a dict mapping the labels of this model's vocabulary to the
chord types of the chord corpus. |
source code
|
|
|
|
get_mapping_from_corpus(self)
Returns a dict mapping the chord types of the chord corpus to this
model's chord labels. |
source code
|
|
|
|
map_to_corpus(self,
sequence)
Postprocesses the sequence, which should be a sequence in the form it
comes out from the labeler, to apply the corpus mapping associated
with this labeler. |
source code
|
|
|
|
|
|
|
|
|
|
transition_log_probability(self,
state,
previous_state)
Gives the probability P(label_i | label_(i-1), ..., label_(i-n)),
where the previous labels are given in the sequence label_context. |
source code
|
|
|
|
|
|
|
|
|
|
get_small_emission_matrix(self,
sequence)
Instead of building the emission matrix for every state, just
includes probabilities for (root,label) pairs, decomposed into 2
dimensions. |
source code
|
|
|
|
get_small_transition_matrix(self,
transpose=False)
Decomposed version of just the chord part of the transition
probabilities, for forward-backward calculations. |
source code
|
|
|
|
|
|
|
|
|
|
| compute_decomposed_xi(self,
sequence,
forward=None,
backward=None,
emission_matrix=None,
transition_matrix=None) |
source code
|
|
|
|
label(self,
midi,
options={},
corpus=False)
Decodes the model with the given midi data to produce a chord
labeling. |
source code
|
|
|
|
label_lattice(self,
*args,
**kwargs)
Decodes the model and produces a lattice of the top probability chord
labels. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from utils.nltk.ngram.dictionary.DictionaryHmmModel:
compute_gamma,
compute_xi,
viterbi_decode
Inherited from utils.nltk.ngram.model.NgramModel:
__repr__,
backward_log_probabilities,
backward_probabilities,
decode_forward,
decode_gamma,
emission_probability,
forward_backward_log_probabilities,
forward_backward_probabilities,
forward_log_probabilities,
forward_probabilities,
gamma_probabilities,
generalized_viterbi,
generate,
get_all_ngrams,
get_backoff_models,
get_transition_matrix,
labeled_sequence_log_probability,
normal_forward_backward_probabilities,
precompute,
transition_log_probability_debug,
transition_probability,
transition_probability_debug,
viterbi_selector_probabilities
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|