class documentation

class AveragedPerceptron: (source)

Constructor: AveragedPerceptron(weights)

View In Hierarchy

An averaged perceptron, as implemented by Matthew Honnibal.

See more implementation details here:
https://explosion.ai/blog/part-of-speech-pos-tagger-in-python
Class Method decode_json_obj Undocumented
Method __init__ Undocumented
Method average_weights Average weights from all iterations.
Method encode_json_obj Undocumented
Method load Load the pickled model weights.
Method predict Dot-product the features and current weights and return the best label.
Method save Save the pickled model weights.
Method update Update the feature weights.
Class Variable json_tag Undocumented
Instance Variable classes Undocumented
Instance Variable i Undocumented
Instance Variable weights Undocumented
Method _softmax Undocumented
Instance Variable _totals Undocumented
Instance Variable _tstamps Undocumented
@classmethod
def decode_json_obj(cls, obj): (source)

Undocumented

def __init__(self, weights=None): (source)

Undocumented

def average_weights(self): (source)

Average weights from all iterations.

def encode_json_obj(self): (source)

Undocumented

def load(self, path): (source)

Load the pickled model weights.

def predict(self, features, return_conf=False): (source)

Dot-product the features and current weights and return the best label.

def save(self, path): (source)

Save the pickled model weights.

def update(self, truth, guess, features): (source)

Update the feature weights.

json_tag: str = (source)

Undocumented

Undocumented

Undocumented

Undocumented

def _softmax(self, scores): (source)

Undocumented

Undocumented

_tstamps = (source)

Undocumented