Text classification model config


The model config YAML file for tabular classification should contain the following attributes:

architectureTypestr-The model's framework.Must be one of: sklearn, xgboost, fasttext, keras, pytorch, rasa, tensorflow, transformers, llm.

If the framework being used is not one of the above, use custom.
classNamesList[str]-List of class names corresponding to the outputs of your prediction function.E.g. ["Retained", "Exited"].
metadataDict[str, any]{}Dictionary containing metadata about the model.This is the metadata that will be displayed on the Openlayer platform.
namestr-Name of the model.
predictionThresholdfloatNoneThe threshold used to determine the predicted class.Applies only if you
are using a binary classifier and you provided the predictionScoresColumnName
with the lists of class probabilities in your datasets.

If you provided predictionScoresColumnName but not predictionThreshold,
the predicted class is defined by the argmax of the lists in predictionScoresColumnName.


Let’s look at an example dataset from one of the sample notebooks from Openlayer’s examples gallery GitHub repository.

A valid model_config.yaml file would be:

architectureType: sklearn
- negative
- positive
  model_type: Logistic Regression
  regularization: None
name: Sentiment analysis model