nessie.models.model
Module Contents
Classes
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
- class nessie.models.model.Callbackable
Bases:
abc.ABC
Helper class that provides a standard way to create an ABC using inheritance.
- abstract add_callback(self, name: str, callback: transformers.TrainerCallback)
- class nessie.models.model.CallbackableModel
Bases:
Model
,Callbackable
,abc.ABC
Helper class that provides a standard way to create an ABC using inheritance.
- class nessie.models.model.Model
Bases:
abc.ABC
Helper class that provides a standard way to create an ABC using inheritance.
- __repr__(self)
Return repr(self).
- __str__(self)
Return str(self).
- abstract fit(self, X, y)
- has_dropout(self) bool
- abstract label_encoder(self) sklearn.preprocessing.LabelEncoder
Returns a label encoder that can be used to map labels to ints and vice versa
- name(self) str
- abstract predict(self, X)
- abstract predict_proba(self, X)
Returns a distribution over all labels for each item
- abstract score(self, X)
Returns the best score for each item
- use_dropout(self, is_activated: bool)
- class nessie.models.model.SequenceTagger
Bases:
Model
,abc.ABC
Helper class that provides a standard way to create an ABC using inheritance.
- abstract fit(self, X: nessie.types.RaggedStringArray, y: nessie.types.RaggedStringArray)
- abstract predict(self, X: nessie.types.RaggedStringArray) awkward.Array
- abstract predict_proba(self, X: nessie.types.RaggedStringArray) awkward.Array
Returns a distribution over labels for each instance.
- Parameters
X – The token sequences to predict on
- Returns
A (num_sentences, num_tokens, num_labels) ragged array
- abstract score(self, X: nessie.types.RaggedStringArray) awkward.Array
Returns the best score for each item
- class nessie.models.model.TextClassifier
Bases:
Model
,abc.ABC
Helper class that provides a standard way to create an ABC using inheritance.
- abstract fit(self, X: nessie.types.StringArray, y: nessie.types.StringArray)
- abstract predict(self, X: nessie.types.StringArray) numpy.typing.NDArray[str]
- abstract predict_proba(self, X: nessie.types.StringArray) numpy.typing.NDArray[float]
Returns a distribution over labels for each instance.
- Parameters
X – The texts to predict on
- Returns
A (num_instances, num_labels) numpy array
- abstract score(self, X: nessie.types.StringArray) numpy.typing.NDArray[float]
Returns the best score for each item