Text classification model config
Attributes
The model config YAML file for tabular classification should contain the following attributes:
Attribute | Type | Default | Description | Comments |
---|---|---|---|---|
architectureType | str | - | 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 . |
classNames | List[str] | - | List of class names corresponding to the outputs of your prediction function. | E.g. ["Retained", "Exited"]. |
metadata | Dict[str, any] | {} | Dictionary containing metadata about the model. | This is the metadata that will be displayed on the Openlayer platform. |
name | str | - | Name of the model. | |
predictionThreshold | float | None | The 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 . |
Examples
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
classNames:
- negative
- positive
metadata:
model_type: Logistic Regression
regularization: None
name: Sentiment analysis model
Updated about 1 month ago