Binary Classification
Binary classification models predict a binary outcome (one of two possible classes). In Aporia, these models are represented by the binary model type.
Examples of binary classification problems:
Will the customer
buy
this product ornot_buy
this product?Is this email
spam
ornot_spam
?Is this review written by a
customer
or arobot
?
Frequently, binary models output not only a yes/no answer, but also a probability.
Example: Boolean Decision without Probability
If you have a model with a yes/no decision but without a probability value, then your database may look like the following:
To monitor this model, we will create a new model version with a schema that include a boolean
prediction:
To connect this model to Aporia from your data source, call the connect_serving(...)
API:
Check out the Data Sources section for further reading on the available data sources and how to connect to each one of them.
Example: Boolean Decision with Probability
If you have a model with a yes/no decision and a probability / confidence value for it, then your database may look like the following:
To monitor this model, it's recommended to create a new model version with a schema that includes the final decision as boolean
field, and the probability as a numeric
field:
To connect the model to Aporia from a data source, call the connect_serving(...)
API:
Check out the Data Sources section for further reading on the available data sources and how to connect to each one of them.
Example: Probability Only
In cases when there is no threshold for your boolean prediction, and the final business result is actually a probability, you may simply omit the decision
field from the examples in the previous section and only include the proba
field for your prediction.
Don't want to connect to a database?
Don't worry - you can log your predictions directly to Aporia.
Last updated