nessie.models.text.dummy_text_classifier

Module Contents

Classes

DummyTextClassifier

Helper class that provides a standard way to create an ABC using

class nessie.models.text.dummy_text_classifier.DummyTextClassifier

Bases: nessie.models.TextClassifier

Helper class that provides a standard way to create an ABC using inheritance.

fit(self, X: nessie.types.StringArray, y: nessie.types.StringArray)
has_dropout(self) bool
label_encoder(self) sklearn.preprocessing.LabelEncoder

Returns a label encoder that can be used to map labels to ints and vice versa

predict(self, X: nessie.types.StringArray) numpy.typing.NDArray[str]
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

score(self, X: nessie.types.StringArray) numpy.typing.NDArray[float]

Returns the best score for each item

use_dropout(self, is_activated: bool)