Skip to main content
Version: 0.94

templates.MultiPolarModelBasedTemplateSchema

class templates.MultiPolarModelBasedTemplateSchema(*args, **kwargs)

Multipolar Model Based template

Parameters

NameTypeDefaultInfo
include_fieldsList[str]The fields to include in the model featurization.
target_fieldstrThe field containing the model predictions.
model_typestr
The specific model used, must be contained in:

[“zsl_text_match”, “zsl_entailment”, “masked_lm”, “logistic_regression”, “one_class_svm”, “tfidf_logreg”, “setfit”, “sdnet”, “sequence_embedding”]

model_namestrA user specified string name given to the trained model.
valueNoneInherited from ModelBasedTemplateSchema, but not used.
dirpathstrThe path to the stored model in minio.
thresholdfloatThe confidence threshold below which this LF should abstain.
unique_model_nameOptional[str]NoneA unique name for the model, usually the same as dirpath.
is_multilabelboolFalseWhether or not the task this LF is being applied to is multi-label.
multilabel_absent_as_abstainboolTrueIf this is a multi-label task, True if we should replace “absent” votes output by the model with “abstain” votes.
inv_label_mapDict[str, int]A mapping from the user’s class labels to the LF’s class labels.