Package jazzparser :: Package taggers :: Package baseline1 :: Module tagger :: Class Baseline1Model
[hide private]
[frames] | no frames]

Class Baseline1Model

source code

        object --+    
                 |    
models.TaggerModel --+
                     |
                    Baseline1Model

A class to encapsulate the model data for the tagger.

Instance Methods [hide private]
 
__init__(self, model_name, *args, **kwargs)
Creates an empty, untrained model.
source code
 
_add_category_chord_count(self, category, chord)
Adds a count of the joint observation of the category and the chord and of the category and the chord themselves.
source code
 
train(self, sequences, grammar=None, logger=None)
Trains the loaded model using the data in the list of sequences.
source code
 
get_prob_cat_given_chord(self, cat, chord) source code

Inherited from models.TaggerModel: delete, get_extra_filenames, process_training_options, save

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

Class Methods [hide private]

Inherited from models.TaggerModel: list_models, load_model

Inherited from models.TaggerModel (private): _get_model_dir, _load_model

Class Variables [hide private]
  MODEL_TYPE = 'baseline1'
hash(x)

Inherited from models.TaggerModel: TRAINING_OPTIONS

Properties [hide private]

Inherited from models.TaggerModel: description, options

Inherited from models.TaggerModel (private): _filename

Inherited from object: __class__

Method Details [hide private]

__init__(self, model_name, *args, **kwargs)
(Constructor)

source code 

Creates an empty, untrained model. To load a previously stored model, use from_file().

Optionally stores some custom descriptive text. This will be included in the descriptive text that gets stored along with the model.

Overrides: object.__init__
(inherited documentation)

train(self, sequences, grammar=None, logger=None)

source code 

Trains the loaded model using the data in the list of sequences.

Overrides: models.TaggerModel.train
(inherited documentation)