Customer Segmentation using No-Code Machine Learning Models for Target Marketing: How-to
#case study
#machine learning
#marketing
Cross-selling can be resource-intensive when marketers lack data-driven insights from historical data and customer patterns for future outcome predictions. Machine learning can assist marketers in prioritizing resources. Read this article to learn how to create relevant customer segmentation for target marketing using no-code machine learning models easily. This predictive marketing case study provides a practical example of classifying existing customers (policyholders) of an insurance company/agency/broker into different segments based on their likelihood of purchasing travel insurance. This target marketing strategy aims to improve the return on investment (ROI) by reducing marketing cost and achieving higher response rates. Besides, the target customers would be more satisfied as their needs are met. Following to the steps, every marketer can uncover business opportunities using an automated machine learning tool with no coding required.

Instruction Highlights:
High-Level Process of Analysis
The following procedures illustrate a step-by-step process for building a machine learning model for customer segmentation in target marketing for travel insurance campaign.

Prepare Customer Data:
- Assess the profiles of all customers, including those who have or have not purchased the travel plan.
Build & Evaluate Model:
- Train a machine learning model using the current customer data to learn which type of customers are more likely to buy travel insurance based on historical experience.
- This case study focuses on a supervised learning problem. The dataset used for modeling must include the “target response” field for each individual customer (i.e., whether they have or have not purchased the travel insurance in this case study), which we aim to predict.
- Evaluate the predictive power of the data regarding model performance. Effective predictors (e.g., age/income etc..) should exhibit a notable association with the likelihood of travel and the need for a travel insurance.
Implement & Predict Purchase Likelihood:
- If the model demonstrates good predictive power, it is ready to predict the likelihood of an individual customer purchasing travel insurance.
- Use the full customer data to run a prediction with a satisfied model created above.
- The result is expressed as the probability of the target response “Buy” even for customers who have not yet made a purchase.
- With the estimated probabilities, the insurance company, agency, or broker could classify existing policyholders into groups – e.g., “likely buyers” and “not likely buyers” of travel insurance.
Design Target Marketing Plan:
- Marketers can identify potential customer groups, such as the top 10% with the highest scores (or probability of buying a travel plan).
- Create a target marketing list for insurance agents or personalised communication channels to reach the high-scoring customers who have not yet purchased travel insurance. To incentivize this prioritized segment, marketers could offer exclusive travel vouchers for an annual travel insurance purchase.
- This targeted approach aims to achieve a higher conversion rate of cross-selling compared to random product marketing.
- The remaining customers will not be approached to avoid unnecessary marketing efforts and minimize disturbances due to mismatched needs.
Create Project in a User-friendly Tool
An easy-to-use Excel add-in called ‘Aidy’ is used here for illustrative purposes. Powered by Google Cloud, Aidy enables rapid and reliable modelling for machine learning projects. You can obtain the free starter plan of Aidy and follow the steps to test it out without any coding requirements.

Create new “Project” with the following setting in the Machine Learning tool, Aidy
- “Industry” = “General Business”
- “Problem Area” = “Classification Probability” or “Classification”
- “Business Problem” = “Classifying Data into Groups for Business Use Cases (with Training Data)”
All the tasks and results from the Machine Learning project are automatically organized and stored as systematic documentation for future reference or sharing with the team.
Prepare Customer Data
To build an effective machine learning model, a good business understanding is needed. For example, data used for predicting probabilities should be relevant and helpful in making accurate predictions. Business understanding and intuition play an important role in judging the relevance of predictors. Of course, some predictors may not be obvious initially, so if doubt, better to include them in the modelling process and evaluate their usefulness after running the model. For better predictive power, feature engineering (or transforming data), which can also be done in Aidy, is a very useful technique to create good predictors. For instance, “date of birth” is probably not a good predictor by itself, deriving “age” from it can become a very useful predictor.
The dataset for modelling should be clean, with minimal data issues (e.g., typos, inconsistent data types, missing data) and have sufficient data records — more data in the modeling process can lead to a model with better predictive power and more valuable business insights.
A dataset found from Kaggle was used for this case study. You may download the subset dataset here to follow through the steps.
Below is a summary of the data fields in the above subset dataset:
Identifier Field (which is not used for prediction)
- Index
Possible Predictors
- Age
- Employment Type
- GraduateOrNot (Graduate from college or not)
- AnnualIncome
- FamilyMembers (Number of family members)
- ChronicDisease (Suffering from any major disease or conditions like diabetes/High Blood Pressure / Asthma, etc)
- FrequentFlyer (Booking air tickets on at least 4 different instances in the last 2 years?)
- EverTravelAbroad
Target Response (categorical data to be predicted – a classification problem)
- TravelInsurance (1 = Bought travel insurance before; 0 = Did not buy)

After downloading the above dataset, you can import it into Aidy.
In reality, data often do not behave as well as one would like. Reviewing data and cleansing them from data issues is a very important step. Common data issues are:
- Problematic data field names, e.g., with a space inside, certain special characters.
- Incorrect data type, e.g., numeric data being imported as categorical data.
- Data value issues, e.g., missing values.
These issues could create problems ranging from the inability to import datasets to the failure to fully utilize the underlying value of the data during the modeling process. For example, treating numeric data as categorical data would ignore the “distance” between data points which itself could be useful for prediction. Another example is that missing values could mean a value of zero or a special category which is useful for modeling purposes. Aidy can automatically resolve certain common data issues or prompt users to address others manually during the data import process.

Although there are no data issues in the case study dataset, during the import process, users should pay attention to the data type for each field. Specifically, some categorical datasets may have numerical values (for example, 1 and 0). In such cases, users should change the data type from “Numeric” to “Categorical/Text”. It is important to ensure “Target Response” variable is “Categorical/Text” when the business problem is classification (i.e. only a few possible values for “Target Response”) like this case study. In our dataset, the field “TravelInsurance” should be converted to “Categorical/Text” in terms of the data type, as it serves as the target response in our modeling.
An insurance company/agency/broker would have a lot of policyholder data from the other insurance products they bought. Not every data field is immediately obvious as a likely good predictor. One way to select predictors is to perform an initial screening of the data fields to filter out irrelevant predictors. This screening process could be based on common sense, previous research, external literature, simple data analysis (e.g., scatterplots of the available data fields), etc. However, with Machine Learning, this initial screening does not have to be too time-consuming as the model will figure out which predictors are more important than the others. And it is important to ensure important predictors are captured and not filtered out. So simply try out all possible predictors and see what model results are coming back.
In the travel insurance dataset, “Index” is an identifier and “TravelInsurance” is the target response field we are trying to predict. As such, they cannot be predictors. So, the initial model would simply include all the remaining fields as possible predictors.
Build a Machine Learning Model

After having a dataset for modeling purpose, the next step will be to build a model. You can click on the following in Aidy:
For supervised learning model, the dataset used for modeling would be first split into 2 pieces: Training Dataset and Testing Dataset. The idea is to use the Training Dataset to build a model and then using the Testing Dataset to evaluate the performance of the model.
In Aidy, Split Dataset can be done in the first step of “Build Model” if the Training Dataset and the Testing Dataset are not readily available (it can also be done independently under “Transform Dataset”). One can split the dataset into Training and Testing with a 70% to 30% ratio (Aidy’s default) or some other ratios such as 60%/40% or 80%/20%.
The Training Dataset and Testing Dataset created above for the travel insurance dataset prepared earlier are to be used for building the model. There are various model types in Machine Learning world. Unless there is a preference for a specific model, one can run a build for every model type and compare the results. In Aidy, users can choose from a selection of model types. One of these options is called “Aidy’s Choice” which means that all model types will be run, and the best model will be automatically selected based on a comparison of their performance. With the lightning-fast performance of Aidy, building multiple models iteratively is not really an issue and the results are organized and documented nicely in the Excel spreadsheet for future reference.
In our case study, the next step is to select “TravelInsurance” as the target response. As described earlier, other than the ID-type data field “Index” and the target response, all other data fields are used as predictors in the initial model building exercise.
Evaluate a Machine Learning Model

Good Model with F-score greater than 80%
Fair Model with F-score between 50% and 80%
An automatic evaluation will be done after the best model is built (it can also be done independently under “Evaluate Model”), and the evaluation will be on the Testing Dataset (with 30% of the data records) created earlier. For predicting a categorical target response, F-score is a common measure for assessing the performance of a model. The higher the F-score (maximum of 100%) the better the model.
The F-Score is 80.01% means the model has a good predictive performance. If F-score is between 50% and 80%, it is a fair model meaning that the model can be used, with cautious on its fair performance, for prediction purpose, but further improvement through introducing more predictors is encouraged. If F-score is below 50%, the model is poor and it is not recommended to use it for prediction.

Other than looking at the F-score, it will be of interest to understand the relative importance of the various predictors. To simplify the model, one can pick only the most important predictors in establishing the final model for prediction and for designing the marketing plan (see “Dashboard” section below). In this case, for example, the top three predictors (AnnualIncome, Age and FamilyMembers) appear to be far more important than the other predictors for predicting likely buyers of travel insurance. If a simpler model is desired, a new model with only the above three predictors can be created. The benefit of simplifying a model with fewer predictors is to prevent “overfitting” (i.e., a model which gives accurate predictions for Training/Testing datasets but lacks predictive power when a brand-new dataset is used for prediction). No need to worry overfitting in this case study—the original model with all the predictors is being used.

Data in the matrix which would normally trigger the user’s interests are:
- The average F-Score
- The idea is to use the model to identify records with a prediction of buying travel insurance (i.e. Prediction = “1”) in the future. So, it will be of interest to know how many of those policyholders actually bought travel insurance (i.e. Actual Target = “1”) out of all the predicted “1”. Another way to say it, this is a measure of how accurate it is when we have a Prediction of “1”. This is essentially looking at the yellow highlighted vertical column in the above table. In our result here, we predicted 131 policyholders who would have bought travel insurance and 121 of them (or 92.37%) actually bought it.
- In terms of target marketing, for the Testing Dataset, the 10 policyholders (circled in red) who didn’t buy would be the target customer segment worth the effort of reaching out, as they were predicted to have a high likelihood of buying the product.
- Another interesting piece of information would be to know how many policyholders who actually bought travel insurance (i.e., Actual = “1”) are in fact captured correctly in our prediction (i.e., Prediction is also “1”). Another way to say it, this is a measure of how accurate it is when we captured the actual “1” in our prediction. This is essentially looking at the yellow highlighted horizontal row in the above table. In our result here, 208 policyholders actually bought travel insurance and the model correctly predicted 121 of them (or 58.17%). This is considered a fair performance even though the F-Score is good. Ideally, one can try to use more data or build another model with the aim of achieving a higher percentage here while maintaining a similar F-Score.

In Aidy, a dashboard can be generated for a built model which summarizes the key information such as the model performance (good, fair, or poor) and the relative importance of the predictors. In addition, some business actions are also suggested which can potentially provide tangible business values.

Implement and Predict

Once a satisfactory model is built, for this case study, a prediction task is performed.
We will use the original modeling dataset (before splitting) as an input for prediction purpose and select the best model determined by Aidy’s Choice.

In Aidy, after a prediction task is done, an export file is available for the user to download. This export file can also be found through the Export icon in the Aidy ribbon bar whenever it is needed.

The idea is to find those predicted to have bought (i.e., Prediction = 1) but actually didn’t (i.e., Actual “TravelInsurance” = 0). Filtering this group of customers, those with the highest probability would be the customer segment the marketer should focus on.

Conclusion
This case study provides a step-by-step procedure in revisiting the existing customers and identifying those with a high likelihood of making a purchase but didn’t do so previously. This review employs the actual purchasing pattern of existing customers, and the resulting model can identify similar customers so that the marketing effort can be more targeted with the objective of more efficient use of resources. Aidy, user-friendly yet powerful, provides predictive insights about user interests. Marketers can leverage these insights to uncover business opportunities within the existing customer base.