An Introduction to Predictive Analytics

Alteryx Designer: An Introduction to Predictive Analytics

Table of Contents
    Add a header to begin generating the table of contents

    We are in a digital era where data is more valuable than ever. Traditional data analytics, such as descriptive and diagnostics, remain useful and powerful. But, what if you could further refine your analysis to predict a certain behaviour or trend? For example, using the data to predict the behaviour of a company’s most loyal customers or which customers to target in their next campaign.

    Alteryx’s Analytics Process Automation platform has the power to make the above possible including descriptive, diagnostic and predictive analytics. Predictive analytics is not the easiest to do, but advancements in technology have brought us tools, like the Alteryx Designer, to help us build models easily without having to write any lines of code.

    In this blogpost, we will show you how you could conduct your own predictive analytics through Alteryx with a few simple drag-and-drops. We have also included a use case of a banking institution’s attempt to market their term deposit effectively to their clients. We will be taking the role of a business analyst, attempting to predict the clients who will subscribe to our term deposit.

    Introduction to Alteryx

    Please visit the following links if you would like to find out more about Alteryx. This blogpost will focus on predictive tools and only lightly touch on data cleansing and preparation tools.  

    Let’s now take a look at the dataset we will be working on in this walkthrough.  

    Predictive Analytics with Alteryx

    Telemarketing is traditionally a volume-based activity. Callers must engage thousands of potential contacts and attempt to get a meaningful response from the phone call. Contacting an exhaustive list of leads one-by-one can be extremely inefficient and time consuming.  

    Below we will be conducting predictive analytics on the bank’s marketing data, and from it, predict the list of customers who would return a meaningful phone call for the telemarketers. A meaningful phone call would suggest that the clients are more likely to be interested in knowing more about the deposit or potentially subscribe to it.  

    Alteryx Designers offers a few options when it comes to predictive analytics. Depending on your comfort level and familiarity with predictive analytics, you could choose to work on your data through three different options: 

    1. A completely guided tool that takes you through a step-by-step process to build your predictive model 
    2. A parameterised tool where you decide which specific model you would like to use for your data
    3. A code-friendly tool where you can leverage your data science and coding abilities to create your own predictive model 

    We will demonstrate each tool and compare the results to choose the best algorithm to retrieve our desired outcome.  

    To start off, the marketing dataset we will be working with today is shown below:

    Marketing Dataset

    [Moro et al., 2014] S. Moro, P. Cortez and P. Rita. A Data-Driven Approach to Predict the Success of Bank Telemarketing. Decision Support Systems, Elsevier, 62:22-31, June 2014 

    🔗 Dataset available here.

    Having raw data like the above is not usable and meaningful to analyse. We would need to clean the data and divide it into proper columns for better analysis. With a few data cleaning and preparation tools applied to the dataset, we can transform the raw data above into a usable format: 

    Below are the steps done to achieve the cleaned table shown: 

    Data Preparation
    1. Place the text into separate columns with the Text to Columns tool 
    2. Use the Formula tool to clean the education data 
    3. Remove leading and trailing whitespaces with the Data Cleansing tool 
    4. Rename columns and change the data types accordingly with the Select tool 

    Once that’s done, ensure the data is clean and holds no dirty data or outliers. To confirm this, conduct an Exploratory Data Analysis with Alteryx’s Data Investigation tools to find any dirty data points. Outliers or dirty data could potentially distort the analysis and increase the variability in the data thus, it is imperative that it is removed. 

    Exploratory Data Analysis

    The Data Investigation tool palette includes tools to help us understand the data before using it in a predictive model. These tools can even conduct specialised data sampling tasks for predictive analytics.  

    The Association Analysis tool and the Frequency Table tool can help to efficiently and conveniently spot outliers in the data. Simply drag and drop the tool onto the canvas and select the variables to analyse to build reports that provide insight into the data.  

    Frequency Table tool

    After this, use a few Filter tools to remove dirty data. Using this tool, we  can also filter out unrelated data that may cause noise to the predicting process.  

    To wrap up the data preparation steps, we create a target variable and separate out data into the testing and training datasets.  

    The next step requires a target variable to provide the algorithm with a target. In this case, we want to predict whether a client will subscribe to a term deposit. After dragging and dropping a Formula tool onto the canvas, we can transform ‘subscribed’ into a numerical variable.  

    Formula tool

    From here, we the data can be split into the testing and training datasets. With the Create Samples tool, we want to split the input records into two or three random samples. This can be done by specifying the percentage of records in the testing and training sample. If the total is less than 100%, the remaining records will be placed in the holdout sample. Here, we will be splitting the data 70-20-10, with 10% of the data falling into the holdout sample.  

    Create Samples tool

    The holding set will be used to provide us a final estimate of our chosen model’s performance.  

    To find out more about the testing, training and holdout sets, please refer to this link for more information.  

    Now we’re ready to run predictive models on our data.  

    Predictive Possibilities with Alteryx

    Alteryx Designer provides a variety of options when it comes to conducting predictive analytics on your data. Depending on your comfort level with predictive analytics, you could navigate to the following section to find out more about the predictive tool best suited for you: 

    1. For Beginners – Assisted Modelling Tool 
    2. For Intermediate – Predictive Tools Palette 
    3. For Experts – Python/R Tool 

    Assisted Modelling Tool

    If you are not familiar with the different predictive models, Alteryx’s Assisted Modelling tool is the tool for you. It guides you through a step-by-step process which includes selecting a target variable, setting data types, cleaning up missing values, choosing features and selecting the best algorithm. At the end of it all, you will be able to compare between the algorithms before selecting the right one for your dataset.  

    You have an option to do the modelling step-by-step or automatic.  

    Below is the step-by-step process. The tool will guide you to set the data types of each variable, followed by a step to clean up missing values.  

    Step-by-step process

    Then the model brings you through a feature selection, where you select the predictor variables relevant for the model. The tool will specifically guide you on which features are weak or good predictors.  

    Now you can now select the models suitable for your data. You could choose to run all the algorithms, or just selected specific algorithms you prefer.  

    After selecting the different algorithms, train the model and compare the results of each algorithm.

    Train the model

    If you chose the Automatic mode, the tool would process all the steps for you: 

    Automatic mode

    Once the model is exported to the workflow, you can test against our validation set or alternatively, use the model for new data sets. Below gif illustrates the results from our validation data set which we can compare to our training set.  

    Validation data results

    For the full documentation on Assisted Modelling, refer to this link 

    Predictive Tools Palette

    In case you are familiar with Predictive algorithms but are not exactly well versed with coding, Alteryx Designer provides the ability to select out-of-the-box algorithms including Decision Tree, Naive Bayes Classifier, Linear Regression or Logistics Regression 

    Predictive Tools Palette

    The tools within the palette would just require you to select two parameters, the target variables and the predictor variables. We can drag the predictive tools onto our workflow and create a model.  

    Target variables and the predictor variables

    Once we’ve chosen an algorithm to work with, we can use tools such as the Scoring Tool to validate the algorithm further with the validation set.  

    Scoring Tool

    From that output, with the help of the Filter, Formula, Summarize, and Join Multiple tools, we will be able to also retrieve the confusion matrix values, and subsequently calculate the accuracy, precision and recall of our model.  

    Result of the model

    For the full documentation on Alteryx’s predictive tools, refer to this link 

    Python/R Tool

    If you happen to find a code you kept from a previous algorithm, or you just want to create your own model from scratch through code, Alteryx Designer provides the Python and R tool for scripts to be imported into the workflow. You will need to be proficient with each coding language to use this tool. Here, the specific benefit of Alteryx allows you to quickly blend and prep the data, change data sources or connect to existing data bases without the need to recode your existing Python or R scripts.  

    Alteryx dashboard

    For the full documentation on the Developer tools, refer to this link 

    Comparing Algorithm Outputs

    Predictive modelling is an iterative process and typically involves multiple iterations of testing for result comparison and model enhancement. There could be more than one predictive algorithm that suits your data set best (depending on your requirement).  

    Comparing Algorithm Outputs

    For our dataset, upon comparing the results of the different predictive models, we decided to go with the Decision Tree algorithm that returned an accuracy rate of 90.1%, precision rate of 61.4% and a recall rate of 53.9% 

    Using the remaining 10% of the dataset (holdout), we can simulate the process of curating a list of clients to contact who should return a meaningful phone call. These are the True Positive and False Positive Group from our model output. The process will eliminate clients who will not likely subscribe and allow the telemarketer to focus on those who are more inclined to subscribe or find out more about our term deposit. This can help increase the efficiency of the telemarketers and ensure more meaningful responses received for their contacting efforts.  

    True Positive and False Positive Group

    What’s beyond the Predictive Tools?

    There are a myriad of additional capabilities the Alteryx platform can offer. Alteryx Designer also provides tools that could help you report on the predictive process you have just created. Through the suite of Reporting Tools including the Table Tool, the Interactive Chart Tool and the Layout Tool, we can build a report which summarises the outcomes of our predictive model for non-technical personnel. 


    You can export the data you have worked on into other analytics tools like Tableau for further analysis and dashboard building. Additionally, an Alteryx App can be built to allow users to select specific algorithm combination to use on future datasets or workflows.  

    Endless Possibilities with Alteryx

    If you are looking for a tool to help you get started on your predictive analytics journey or would like to explore more possibilities and capabilities of Predictive Analytics, Alteryx Designer would be a fantastic place to start. With Alteryx Designer, you could be assured that you can gain more meaningful predictive insights as you explore and analyse your data with the suite of predictive tools available on Alteryx.  

    Here at Billigence, we can help you explore tools and solutions to cater to your organization with the assistance of our very own Alteryx Certified Consultants. Please feel free to submit an enquiry form below to find out more and get in touch. We would love to help you start your journey and uncover hidden potentials of your organisation’s data with Alteryx. 

    Ready to know the future?

    Leave a Comment