Skip to main content
image Predict which leads have the most propensity to convert. We will train a machine learning (ML) model based on historical lead conversion data, in order to predict likelihood of conversion for new leads. Determining the value of each lead is a critical factor for businesses that want to maximize their sales efforts. It helps them identify which leads are most likely to convert and generate revenue over time. Here is an example on how to build an ML model in Peliqan.io with a few lines of Python code.

Import required modules

Load a dataset

Load data from a table into a dataframe (df). The table needs to contains lead data, including an indication if these leads converted (historical data).

Using Streamlit to build an app

We use the Streamlit module (st), built into Peliqan.io, to build a UI and show data.
This is what the output looks like: image Here’s our code in the Peliqan low-code editor, with a preview: image

Prepare the data

We remove unwanted columns (features) from our leads and convert categories (e.g. lead source) to a numerical value:

Train and save the model

Once the data is ready we split it into a training set and a testing sets to evaluate the model. We save the model to make more predictions later on.
Expand this to see the full code

Next Steps

  1. You can make predictions on real-time incoming data using the saved model. Learn more about making real-time predictions on new incoming data.
  2. You can make real-time predictions on new incoming data and send alerts to slack if the model makes a prediction above a certain threshold.
  3. Using Peliqan you can create an app for business users to consume the model you have made. Learn more about creating apps for users to consume your ML model.