NYC Data Science Academy| Blog
Bootcamps
Lifetime Job Support Available Financing Available
Bootcamps
Data Science with Machine Learning Flagship ๐Ÿ† Data Analytics Bootcamp Artificial Intelligence Bootcamp New Release ๐ŸŽ‰
Free Lesson
Intro to Data Science New Release ๐ŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook Graduate Outcomes Must See ๐Ÿ”ฅ
Alumni
Success Stories Testimonials Alumni Directory Alumni Exclusive Study Program
Courses
View Bundled Courses
Financing Available
Bootcamp Prep Popular ๐Ÿ”ฅ Data Science Mastery Data Science Launchpad with Python View AI Courses Generative AI for Everyone New ๐ŸŽ‰ Generative AI for Finance New ๐ŸŽ‰ Generative AI for Marketing New ๐ŸŽ‰
Bundle Up
Learn More and Save More
Combination of data science courses.
View Data Science Courses
Beginner
Introductory Python
Intermediate
Data Science Python: Data Analysis and Visualization Popular ๐Ÿ”ฅ Data Science R: Data Analysis and Visualization
Advanced
Data Science Python: Machine Learning Popular ๐Ÿ”ฅ Data Science R: Machine Learning Designing and Implementing Production MLOps New ๐ŸŽ‰ Natural Language Processing for Production (NLP) New ๐ŸŽ‰
Find Inspiration
Get Course Recommendation Must Try ๐Ÿ’Ž An Ultimate Guide to Become a Data Scientist
For Companies
For Companies
Corporate Offerings Hiring Partners Candidate Portfolio Hire Our Graduates
Students Work
Students Work
All Posts Capstone Data Visualization Machine Learning Python Projects R Projects
Tutorials
About
About
About Us Accreditation Contact Us Join Us FAQ Webinars Subscription An Ultimate Guide to
Become a Data Scientist
    Login
NYC Data Science Acedemy
Bootcamps
Courses
Students Work
About
Bootcamps
Bootcamps
Data Science with Machine Learning Flagship
Data Analytics Bootcamp
Artificial Intelligence Bootcamp New Release ๐ŸŽ‰
Free Lessons
Intro to Data Science New Release ๐ŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook
Graduate Outcomes Must See ๐Ÿ”ฅ
Alumni
Success Stories
Testimonials
Alumni Directory
Alumni Exclusive Study Program
Courses
Bundles
financing available
View All Bundles
Bootcamp Prep
Data Science Mastery
Data Science Launchpad with Python NEW!
View AI Courses
Generative AI for Everyone
Generative AI for Finance
Generative AI for Marketing
View Data Science Courses
View All Professional Development Courses
Beginner
Introductory Python
Intermediate
Python: Data Analysis and Visualization
R: Data Analysis and Visualization
Advanced
Python: Machine Learning
R: Machine Learning
Designing and Implementing Production MLOps
Natural Language Processing for Production (NLP)
For Companies
Corporate Offerings
Hiring Partners
Candidate Portfolio
Hire Our Graduates
Students Work
All Posts
Capstone
Data Visualization
Machine Learning
Python Projects
R Projects
About
Accreditation
About Us
Contact Us
Join Us
FAQ
Webinars
Subscription
An Ultimate Guide to Become a Data Scientist
Tutorials
Data Analytics
  • Learn Pandas
  • Learn NumPy
  • Learn SciPy
  • Learn Matplotlib
Machine Learning
  • Boosting
  • Random Forest
  • Linear Regression
  • Decision Tree
  • PCA
Interview by Companies
  • JPMC
  • Google
  • Facebook
Artificial Intelligence
  • Learn Generative AI
  • Learn ChatGPT-3.5
  • Learn ChatGPT-4
  • Learn Google Bard
Coding
  • Learn Python
  • Learn SQL
  • Learn MySQL
  • Learn NoSQL
  • Learn PySpark
  • Learn PyTorch
Interview Questions
  • Python Hard
  • R Easy
  • R Hard
  • SQL Easy
  • SQL Hard
  • Python Easy
Data Science Blog > Capstone > Banco Santander Retail Customer Satisfaction

Banco Santander Retail Customer Satisfaction

Sricharan Maddineni, Wendy Yu, Matt Samelson and Michael Todisco
Posted on Mar 31, 2016

Contributed by Sricharan Maddineni, Wendy Yu, Matt Samelson, and Michael Todisco. They are currently in the NYC Data Science Academy 12 week full time Data Science Bootcamp program taking place between January 11th to April 1st, 2016. This post is based on their final capstone project  (due on the 12th week of the program).

Banco Santander enlisted the help of the Data Science community in a recently sponsored competition on the Kaggle. The competition objective was to build a predictive model to classify satisfied and dissatisfied customers.

The bank provided both a training and test dataset. The training dataset provided an indicator of client satisfaction. Competition participants were asked to use this set to formulate and tune a model to successfully predict satisfaction of clients in a test dataset for which a satisfaction indicator was not provided.

The training data set consisted of 369 anonymized variables and 76,818 observations.

The Data

Little information was available on the variables. Only the data structure and particular hints in variable names (in Spanish no less) provided insight into how best to pre-process data. Matters were complicated in that it was not immediately clear which variables were categorical and which were continuous. Furthermore, some variables were outright useless in that they consisted of a single value for each observation in the dataset. We observed that the data was largely imbalanced by group. The training set contained approximately 73,000 satisfied customers and approximately 3,000 dissatisfied clients.

Our examination suggested that predictors consisting exclusively of integer values were categorical while the remaining variables were continuous. Utilizing this approach, we separated categorical variables and continuous variables. We identified categorical variables as such and applied centering and standardization processes to continuous variables to remove any unwanted effect in subsequent model fitting due to scaling issues. We also checked categorical variables for zero variance to identify and remove those in which only one value was present for all observations (thereby nullifying their predictive value).

Preprocessing

Pre-processing data is essential to proper model performance in many instances.  Many non-parametric models will not perform properly if data is not standardized.  Furthermore, unprocessed data sets may have variables with missingness and/or values that have no predictive value (so-called "zero-variance" factors with only one specified level, etc.).  Variables with clearly  no predictive value are best removed since they consume valuable machine resources when fitting a model.  Accordingly, working with missingness and appropriate standardization is an essential first-step to any modeling endeavor.

The Santander data set did not have issues with missingness.  Values were specified for all variables. That said, some of the values were meaningless (e.g., "-99999" filler values).  The code below depicts the pre-processing steps taken to pre-process the data prior to the commencement of modelling:


The Models

We began by applying high accuracy models to the problem to assess the maximum degree of predictability. Our initial efforts included running boosted tree models and deep learning models.

Xgboost - Sricharan Maddineni

Extreme Gradient boosting is a powerful machine learning algorithm that excels in regression, classification and ranking. Xgboost allows us to achieve a simple and predictive model. Gradient boosting works by creating hundreds of tree models that additively produce one highly predictive model. One deficiency of Xgboost is it can only deal with numeric matrices but this was not an issue in the Santander dataset since all observations were numeric. Xgboost algorithm also appreciates sparse model matrices because observations are denoted as 1โ€™s or 0โ€™s and this simplifies the computational requirements.

The key to xgboost is finding the right parameters by defining the objective function to measure the performance of the model. The equation for the objective function is given as follows:

Obj(ฮ˜)=L(ฮ˜)+ฮฉ(ฮ˜)

where L is the training loss function and ฮฉ is the regularization term.

The regularization term controls the model complexity and helps avoid overfitting. For this specific kaggle competition, the AUC was optimized, but it is more common to use the logistic loss.

Xgboost is an ensembling tree model where the prediction scores of each individual tree are summed up to get the final score. Additionally, we get CART scores rather than classification values which lend to more interpretability than classifications. Mathematically this is represented as:

Screen Shot 2016-03-31 at 11.51.40 AM

where K is the number of trees, F is the set of all CARTS, and f is a function in the functional space F.

The objective to optimize function can therefore be written as:

Screen Shot 2016-03-31 at 11.56.10 PM

Creating the sparse model matrix:

Xgboost Model Code:

Making the prediction:

xgbplot5

Cross Validation

Feature Importance from Xgboost:

sant

GBM Model - Mike Todisco

GBM is a predictive modeling algorithm can be used for both classification and regression. In this instance, we used decision trees as a basis, which is the dominant usage, but GBM can take on other forms such as linear. The model is โ€˜boostedโ€™ in that it algorithmically combines multiple weak models and it is โ€˜gradient boostedโ€™ in that it iteratively solves the residuals to improve accuracy. GBM is competitive with other high-end algorithms and has reliable performance. We didnโ€™t have any missing data, but GBM is robust enough to handle NAโ€™s. GBM also makes any scaling or normalizing unnecessary.

The GBM package has several loss functions that it can run with. We chose to look at two of the loss functions; Bernoulli and Adaboost. Bernoulli is a logistic loss function for 0โ€™s and 1โ€™s. Adaboost is an exponential loss function for 0โ€™s and 1โ€™s.

There are many parameters to tune in the GBM model. Here are a few of the more important ones:

โ€ข Number of trees

โ€ข Shrinkage โ€“ this is also know as the learning rate, dictating how fast/aggressive the algorithm moves across the loss gradient

โ€ข Depth - the number of decisions that each tree will evaluate

โ€ข Minimum Observations โ€“ dictates the number of observations that must be present to yield a terminal node

โ€ข Cv.Folds โ€“ the number of cross-validations to run

Adaboost Code:

download

Bernoulli Code:

download (1)

Random Forest - Matt Samelson

We were able to run a random forest model with optimized parameters in the R Caret package using the train function. This packaging function have some beneficial aspects in that they afford powerful analysis and optimization characteristics not found in underlying packages.

In this instance we elected to utilize the model drawing on the R-based ranger package to generate the forest.

To maximize computational resources we elected to tune three parameters: eta, sample by tree, number of trees per round, and maximum tree depth. The range of parameters can be found in the code displayed below.  This was done by means of a grid search in which values were specified for each tuning parameter.  The process ran for an astounding 12 hours before yielding the optimal model.

We also employed five-fold cross validation to further optimize the forest construction. Overall model results can be seen in the summary table located at the end of the blog post.

Random Forrest Code:

Neural Net

Random Hyper Parameter Search Random Parameters:

  • Activation function to be used in the hidden layers
  • The number and size of each hidden layer in the model
  • L1 Regularization: constrains the absolute value of the weights and has the net effect of dropping some weights (setting them to zero) from a model to reduce complexity and avoid overfitting.
  • L2 Regulation: constrains the sum of the squared weights. This method introduces bias into parameter estimates, but frequently produces substantial gains in modeling as estimate variance is reduced.
  • Input Dropout Ratio: A fraction of the features for each training row to be omitted from training in order to improve generalization
  • Hidden Dropout Ratios: A fraction of the inputs for each hidden layer to be omitted from training in order to improve generalization.

Neural Net Code:


 Model Results

Model and Parameter XGBoost Adaboost Neural Net Bernoulli RF
AUC 0.840771 0.839205 0.821 0.820872 0.787

Model results were highly predictive as expected given the use of non-parametric modeling techniques that emphasize accuracy over interpretation.  The project objective was one emphasizing accuracy.

R modeling packages are increasingly improving and providing insight into the construction of complex models.  As indicated above under the factor importance chart easily produced after boosted tree modeling in the XGBoost package, 3, 184, 370, and 168 were responsible for a substantial amount of gain in the boosted tree model and therefore have substantial predictive value.

Santander management will hopefully be able to take the results of this endeavor to implement processing that provides both high-level predictive value in identifying dissatisfied clients as well as garnering insight into the factors that drive dissatisfaction.

 

About Authors

Sricharan Maddineni

Sricharan Maddineni was a Neuroscience undergrad at Rutgers university. He is a professional music producer turned Data Scientist who has worked with major artists like Kid Ink, Dj Mustard, BMG and garnered over 18 million plays. He has...
View all posts by Sricharan Maddineni >

Wendy Yu

As a biologist, Wendy believes in evidence-base analysis, and is passionate about data. Wendy graduated from the University of Pennsylvania in 2013 with a Masters in Biotechnology. While pursuing a career as a biologist Wendy quickly realized that...
View all posts by Wendy Yu >

Matt Samelson

Matt Samelson is a data scientist and leader passionate about "hands-on" problem-solving using statistical analysis, predictive analytics, and visualization. He has a track record of driving incremental business improvements and a background in management, consulting, and quantitative research....
View all posts by Matt Samelson >

Michael Todisco

Michael has a B.A. in economics from Johns Hopkins University. Over the last four years he has been in the professional world, working at two NYC start-up companies. First, at JackThreads where he was a data analyst for...
View all posts by Michael Todisco >

Related Articles

Capstone
Predicting the Unpredictable: Revolutionizing E-commerce Delivery with Machine Learning
Capstone
The Convenience Factor: How Grocery Stores Impact Property Values
Capstone
Acquisition Due Dilligence Automation for Smaller Firms
R Shiny
Forecasting NY State Tax Credits: R Shiny App for Businesses
Machine Learning
Pandemic Effects on the Ames Housing Market and Lifestyle

Leave a Comment

Cancel reply

You must be logged in to post a comment.

U.S. Bank puts customer first with Salesforce Einstein - Enterprise Times July 24, 2017
[โ€ฆ] of predictive analytics supporting retail banking has become increasingly popular in recent years Banco Santander sponsored a competition in 2016 to see how data science could improve customer relationships. This was later developed further with [โ€ฆ]
coche September 25, 2016
That is ัตery attention-grabbing, ะฃou are ะฐn excessively professional blogger. ะ†'ve joined าฏour rss feed ษ‘nd sit up for in the hunt for mะพre of your excellent post. Additionally, ำ've shared าฏฮฟur web site in my social networks
Rajendra May 20, 2016
Sricharan Maddineni , The information is very helpful. Thank you. I did not get any mail notification over this reply. I have some questions : 1) If we apply some Boosting or bagging algorithms using Neural net based model, what can we say about the performance of the model? 2) As I can understand from your code, You have made 20 different random models which will run for " 1 epoch ". If you increase no. of epochs, what will be models performance? Thanks , Rajendra
Sricharan Maddineni April 28, 2016
Yeah we are Pandas Nyc Data Science Academy team name.
Albert April 20, 2016
Are the results shown here produced by Kaggle after submitting the output file?
Sricharan Maddineni April 12, 2016
Rajendra, Thanks for reading! I've added info on our Neural Nets Model, hope this is helpful! Let me know if you have more questions. - Sri
Rajendra April 12, 2016
A very informative post. Thanks. I wanted to know the approach for "Neural Net " as well. I could not find in this post. My best result till now is 0.8153 . I am not able to improve it any further using "Neural Net". Thanks
Rajendra April 12, 2016
A very informative post. Thanks. but I could not find the "Neural Net" model. I have used "neural Net" for this competition. My best score is 0.815103. After this I am not able to improve it. It would be great if you can share the approach for "Neural net" model too. Thanks , Rajendra

View Posts by Categories

All Posts 2399 posts
AI 7 posts
AI Agent 2 posts
AI-based hotel recommendation 1 posts
AIForGood 1 posts
Alumni 60 posts
Animated Maps 1 posts
APIs 41 posts
Artificial Intelligence 2 posts
Artificial Intelligence 2 posts
AWS 13 posts
Banking 1 posts
Big Data 50 posts
Branch Analysis 1 posts
Capstone 206 posts
Career Education 7 posts
CLIP 1 posts
Community 72 posts
Congestion Zone 1 posts
Content Recommendation 1 posts
Cosine SImilarity 1 posts
Data Analysis 5 posts
Data Engineering 1 posts
Data Engineering 3 posts
Data Science 7 posts
Data Science News and Sharing 73 posts
Data Visualization 324 posts
Events 5 posts
Featured 37 posts
Function calling 1 posts
FutureTech 1 posts
Generative AI 5 posts
Hadoop 13 posts
Image Classification 1 posts
Innovation 2 posts
Kmeans Cluster 1 posts
LLM 6 posts
Machine Learning 364 posts
Marketing 1 posts
Meetup 144 posts
MLOPs 1 posts
Model Deployment 1 posts
Nagamas69 1 posts
NLP 1 posts
OpenAI 5 posts
OpenNYC Data 1 posts
pySpark 1 posts
Python 16 posts
Python 458 posts
Python data analysis 4 posts
Python Shiny 2 posts
R 404 posts
R Data Analysis 1 posts
R Shiny 560 posts
R Visualization 445 posts
RAG 1 posts
RoBERTa 1 posts
semantic rearch 2 posts
Spark 17 posts
SQL 1 posts
Streamlit 2 posts
Student Works 1687 posts
Tableau 12 posts
TensorFlow 3 posts
Traffic 1 posts
User Preference Modeling 1 posts
Vector database 2 posts
Web Scraping 483 posts
wukong138 1 posts

Our Recent Popular Posts

AI 4 AI: ChatGPT Unifies My Blog Posts
by Vinod Chugani
Dec 18, 2022
Meet Your Machine Learning Mentors: Kyle Gallatin
by Vivian Zhang
Nov 4, 2020
NICU Admissions and CCHD: Predicting Based on Data Analysis
by Paul Lee, Aron Berke, Bee Kim, Bettina Meier and Ira Villar
Jan 7, 2020

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day ChatGPT citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay football gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income industry Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI

NYC Data Science Academy

NYC Data Science Academy teaches data science, trains companies and their employees to better profit from data, excels at big data project consulting, and connects trained Data Scientists to our industry.

NYC Data Science Academy is licensed by New York State Education Department.

Get detailed curriculum information about our
amazing bootcamp!

Please enter a valid email address
Sign up completed. Thank you!

Offerings

  • HOME
  • DATA SCIENCE BOOTCAMP
  • ONLINE DATA SCIENCE BOOTCAMP
  • Professional Development Courses
  • CORPORATE OFFERINGS
  • HIRING PARTNERS
  • About

  • About Us
  • Alumni
  • Blog
  • FAQ
  • Contact Us
  • Refund Policy
  • Join Us
  • SOCIAL MEDIA

    ยฉ 2025 NYC Data Science Academy
    All rights reserved. | Site Map
    Privacy Policy | Terms of Service
    Bootcamp Application