Tabular 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 . |
categoricalFeatureNames | List[str] | [] | A list containing the names of all categorical features used by the model. | E.g. ["Gender", "Geography"]. |
classNames | List[str] | - | List of class names corresponding to the outputs of your prediction function. | E.g. ["Retained", "Exited"]. |
featureNames | List[str] | [] | List of input feature names. | |
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
categoricalFeatureNames:
- Gender
- Geography
classNames:
- Retained
- Exited
featureNames:
- CreditScore
- Geography
- Gender
- Age
- Tenure
- Balance
- NumOfProducts
- HasCrCard
- IsActiveMember
- EstimatedSalary
name: Churn prediction model
Updated about 1 month ago