Mastering Data Science with CRISP-DM Methodology: A Step-by-Step Guide

Peter Wainaina
7 min readFeb 11, 2024

--

CRISP-DM Methodology Flowchart.
CRISP-DM Methodology Flowchart.

The Cross Industry Standard Process for Data Mining is an open standard process model that serves as a guiding framework to help organizations effectively navigate the complexities of data science projects, leading to better insights, informed decision-making, and ultimately, business success.

It involves 6 sequential-steps approaches for Data Mining which are:

  1. Business understanding — What does the business need?
  2. Data understanding — What data do we have / need? Is the data clean?
  3. Data preparation — How do we organize the data for modeling?
  4. Modeling — What modeling techniques should we apply?
  5. Evaluation — Which model best meets the business objectives?
  6. Deployment — How do stakeholders access the results?

CRISP-DM is the most commonly used approach for data science projects

“ CRISP-DM remains the most popular methodology for analytics, data mining, and data science projects, with 43% share in the latest KDnuggets Poll…” according to KDnuggets.

Data Science Process Alliance conducted a survey and the results are as shown in the chart below and it is clear that CRISP-DM is still the most preferred methodology in the Data Science industry.

Poll showing that CRISP-DM is a popular choice for Data Scientists.
survey as conducted by Data Science Process Alliance

Business Understanding.

Picture displayed: Understand your business

This is the initial step of the CRISP-DM Methodology and it involves understanding the business goal and asking the important question of whether Machine Learning is actually needed for the project in question.

This phase is the foundation in which the entire CRISP-DM Model is built upon, meaning it is absolutely important not to overlook it.

Here are a few things to consider when in the Business Understanding phase:

  1. Come up with a measurable business goal. This will act as the criteria for success for the entire Methodology. The measurability should be clearly outlined. For example it may be something like: Reduce the customer churn by 15%
  2. Make sure resources needed for the success of the project are available and they include the data and personnel.
  3. Settle on technologies that will actualize the already set business goal.

Data Understanding.

Picture written Data Understanding

This phase involves identifying data sources, collecting the needed data and then analyzing it to see if more data may be needed and if so, iterate the process.

  1. Collect initial data: List the data sources and methods for data collection for each source. This information can be curated in an Initial data collection report.
  2. Describe data: Give a description of the collected data. This description should include the format of the data and the number of observations in the data. This information can be recorded in a Data description report.
  3. Explore data: Check the data distribution (is it the normal bell curve), look at the target variable and predictor variables, check for existing relationships within the data through Exploratory Data Analysis and include the findings in a Data exploration report.
  4. Verify data quality: Check for completeness of the data, if it contains errors, missing values and the distribution and quantity of the missing values if any. Include the findings in a Data quality report.

Data Preparation.

Data preparation sequence

This stage involves cleaning of the data, removing noise-applying pipelines and then converting the data to a favorable format to be used to train a Machine Learning Model.

You need to do encoding of the Categorical columns in your data which is basically the process of converting categorical columns in the dataset into a format that can be put into a ML algorithm. Basing on the nature of the dataset at hand, you can either use:

  • One-hot encoding: When the data has no meaningful order (nominal data). It creates a binary column for each category indicating the presence or absence of that category.
  • Label Encoding: This is used when the data has a meaningful order (ordinal data) and it involves assigning a unique integer to each category.

After categorical columns encoding, you can now scale the features in the dataset which is standardizing and normalizing the features in the dataset. The importance of scaling is to ensure that you have numerical features that are on a similar scale therefore preventing the features that may be having a larger magnitude from dominating the Machine Learning Model.

Types of scaling:

  • Standardization/ z-score Normalization (Standard Scaler) — This is especially useful for algorithms that rely on distance measures like gradient-based optimization. It scales the numerical features to have a standard deviation of 1 and a mean of 0.
  • Min-Max Scaling: Scaling numerical features to a specific range like (0,1)
  • Robust Scaling: This scales data using the InterQuartile Range and it is most useful when the data has outliers.

Modeling

Machine learning

This is one of the most exciting phases, building the Machine Learning Model, where you select the most appropriate modeling technique to address the business problem or achieve the objectives of your project.

Different types of modeling techniques that can be used during this phase include:

  1. Classification Models: These models are used for predicting categorical outcomes. Examples include logistic regression, decision trees, random forests, support vector machines (SVM), and naive Bayes.
  2. Regression Models: Regression models predict continuous numerical outcomes. Techniques include linear regression, polynomial regression, ridge regression, and lasso regression.
  3. Clustering Models: Clustering models are used to group similar data points together based on their characteristics. K-means clustering, hierarchical clustering, and DBSCAN are common clustering techniques.
  4. Time Series Forecasting: Time series models are used to predict future values based on past observations. Examples include autoregressive integrated moving average (ARIMA), exponential smoothing methods, and recurrent neural networks (RNNs).
  5. Anomaly Detection: Anomaly detection models identify unusual patterns or outliers in the data. Techniques include isolation forest, k-nearest neighbors (k-NN), and one-class support vector machines.
  6. Ensemble Models: Ensemble methods combine multiple models to improve prediction accuracy and robustness. Examples include bagging, boosting, and stacking.
  7. Deep Learning Models: Deep learning techniques, such as convolutional neural networks (CNNs), recurrent neural networks (RNNs), and deep belief networks (DBNs), are used for complex pattern recognition tasks, especially in image recognition, natural language processing, and sequence prediction.

During the modeling phase, you typically experiment with different modeling techniques to identify the most effective approach for solving the problem at hand. Make sure you evaluate the performance of each model using appropriate metrics and select the best-performing model for deployment in the next phase of the process.

Evaluation

The primary goal of this phase is to assess the performance and quality of the models developed during the modeling phase.

This phase involves several key activities:

  1. Model Evaluation: Test the performance of each model using the appropriate evaluation metrics. The choice of metrics will depend on the type of problem being solved and the modeling technique you used. For example, classification models may be evaluated using metrics such as accuracy, precision, recall, F1-score, and ROC curve analysis, while regression models may be evaluated using metrics such as mean squared error (MSE) or coefficient of determination (R-squared).
  2. Validation: You do validation of your model to ensure that it can generalize well to unseen data. This typically involves splitting the dataset into training and testing subsets, where the training data is used to train the model and the testing data is used to evaluate the performance of the model. Cross-validation techniques, such as k-fold cross-validation, may also be employed to ensure robustness and reliability of the results.

Overall, the evaluation phase plays a critical role in determining the suitability of the models for deployment in real-world scenarios and informing decision-making processes within the organization.

Deployment

This phase involves implementing the selected model into production and integrating it into the business operations.

Here’s what typically occurs during the deployment phase:

  1. The selected model from the modeling phase is implemented into the production environment. This may involve translating the model code into a deployable format and integrating it with existing systems or applications.
  2. The deployed model is integrated into the existing business processes or decision-making workflows. This may involve automating certain tasks or incorporating model predictions into decision support systems.
  3. The deployed model is thoroughly tested to ensure that it functions as expected in the production environment. This includes validating the model’s performance metrics and verifying its accuracy and reliability.
  4. Monitoring and Maintenance: Once the model is deployed, it is important to continuously monitor its performance and effectiveness over time. This involves tracking key performance indicators (KPIs) and conducting periodic evaluations to ensure that the model continues to deliver value.

Overall, the deployment phase is focused on transitioning the developed model from a prototype or experimental stage to a fully operational solution that adds value to the business. It involves careful planning, testing, and ongoing monitoring to ensure the success of the deployed model in real-world scenarios.

Conclusion

It is important for data scientists to know where CRISP-DM comes from, how it’s organized, and what its main ideas are before starting any data mining work.

Using CRISP-DM helps companies handle data science projects in a universally recognized, proved and tested manner and consequently leading to better data informed decisions, better results for the business, and a stronger position against competitors.

--

--

Peter Wainaina

Software Engineer and Data Scientist in the making. Passionate about building solutions and sharing knowledge through technical articles.