<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/call-center-productivity-boosting-with-ml-exercises/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.r-exercises.com/2017/05/14/call-center-productivity-boosting-with-machine-learning-exercises/?utm_source=rss&utm_medium=rss&utm_campaign=call-center-productivity-boosting-with-machine-learning-exercises"> R-exercises</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><a target="_blank" rel="nofollow" href="https://i1.wp.com/www.r-exercises.com/wp-content/uploads/2017/04/code-1839406__340.jpg"><img sizes="(max-width: 150px) 100vw, 150px" alt="" class="wp-image-4872" src="https://i1.wp.com/www.r-exercises.com/wp-content/uploads/2017/04/code-1839406__340-150x150.jpg?resize=150%2C150" data-recalc-dims="1"></a></p>
<p>The telephone had rung when Jean was watching her favorite TV Show. It was a call center selling newspaper, so she got really upset. This situation is not unpleasant just for Jean. The call center is losing too! By calling a person the will never buy whatever is been sold, the call center is wasting money. Modern machine learning algorithms can help predicting who will be a buyer before the agent pick up the phone. This exercise will teach how to do this task using R. </p>
<p>Answers to the exercises are available <a target="_blank" rel="nofollow" href="http://www.r-exercises.com/2017/05/14/call-center-productivity-boosting-with-ml-solutions/">here</a>.</p>
<p><strong>Exercise 1</strong><br>
Load libraries randomForest, ggplot2, and caret.</p>
<p><strong>Exercise 2</strong><br>
Download bank-full.csv from <a target="_blank" rel="nofollow" href="https://archive.ics.uci.edu/ml/datasets/Bank+Marketing">This website</a>.</p>
<p><strong>Exercise 3</strong><br>
Take a look at this data set using <code>head</code> function. Read the data dictionary to understand all variables.</p>
<p><strong>Exercise 4</strong><br>
Compare age, housing and loan using ggplot boxplots to find out any relations with y variable.</p>
<div>
<aside><img src="http://www.r-exercises.com/2017/05/14/call-center-productivity-boosting-with-machine-learning-exercises/?utm_source=rss&utm_medium=rss&utm_campaign=call-center-productivity-boosting-with-machine-learning-exercises"></aside>
<div><strong>Learn more</strong> about Machine Learning in the online course <a target="_blank" rel="nofollow" href="http://www.r-exercises.com/product/r-complete-machine-learning/">R: Complete Machine Learning Solutions</a>.<br>
In this course you will go over 100 solutions to analyze data and predict outcomes, going thru use cases of machine learning A-B. It is one of the highest rated courses on Udemy at this moment in Machine learning.
</div>
</div>
<p><strong>Exercise 5</strong><br>
Compare day, marital and loan using ggplot boxplots to find out any relations with y variable.</p>
<p><strong>Exercise 6</strong><br>
Make a data partition in order to separate training and testing sets. Reserve 30% of all data for testing procedures.</p>
<p><strong>Exercise 7</strong><br>
Create a prediction model using random forest algorithm. To make this experiment reproducible set seed equals to 1234.</p>
<p><strong>Exercise 8</strong><br>
Predict values for the testing set, and take a look at those values using <code>head</code> function.</p>
<p><strong>Exercise 9</strong><br>
Figure out how many trees were create using this algorithm and the estimate error rate. Create a confusion matrix using the testing versus predicted data using the <code>table</code> function. Why this is different from the Confusion matrix stated in the model description?</p>
<p><strong>Exercise 10</strong><br>
Consider that you are making 100 calls to make a single sale. How many calls you will need now using this machine learning algorithm?</p>
<div>
<h3>Related exercise sets:</h3>
<ol>
<li><a title="Intermediate Tree 2" target="_blank" rel="nofollow" href="http://www.r-exercises.com/2017/01/05/intermediate-tree-2/">Intermediate Tree 2 </a></li>
<li><a title="Model Evaluation Exercises 1" target="_blank" rel="nofollow" href="http://www.r-exercises.com/2016/12/02/model-evaluation-exercise-1/">Model Evaluation Exercises 1 </a></li>
<li><a title="Forecasting: ARIMAX Model Exercises (Part-5)" target="_blank" rel="nofollow" href="http://www.r-exercises.com/2017/05/05/forecasting-arimax-model-exercises-part-5/">Forecasting: ARIMAX Model Exercises (Part-5) </a></li>
<li><a target="_blank" rel="nofollow" href="http://www.r-exercises.com/start-here-to-learn-r/">Explore all our (>1000) R exercises</a></li>
<li><a target="_blank" rel="nofollow" href="http://www.r-exercises.com/r-courses/">Find an R course using our R Course Finder</a> directory</li>
</ol>
</div>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://www.r-exercises.com/2017/05/14/call-center-productivity-boosting-with-machine-learning-exercises/?utm_source=rss&utm_medium=rss&utm_campaign=call-center-productivity-boosting-with-machine-learning-exercises"> R-exercises</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/ytRA4pM2AZ4"></a></div>