Originally from KDnuggets https://ift.tt/3axIVWq
Two Things Starbucks Wished to Know before They Send the Promotion Offers Out
Introduction
Starbucks is one of biggest coffee company and coffeehouse chain around the world. Since the development of internet and smart phone, people’s lives are more and more involved with those technologies. Starbucks also took advantage by sending promotions through those technologies. There was over 10% of in-store purchases made on mobile devices using the Starbucks APP by July 2013, and the number keeps growing. (Source) Once every few days, Starbucks send out an offer to users of the mobile app. An offer can be merely an advertisement for a drink or an actual offer such as a discount or BOGO (buy one get one free). Some users might not receive any offer during certain weeks. Based on those original data, this project’s data were simulated for customer behavior on the Starbucks rewards mobile app. The goal of this project is to help Starbucks to better understand its customers by the following two questions:
1. Which demographic groups respond best to which offer type? (Statistical Application)
2. What are the top 5 features that influence those offer reactions? (Machine learning Application)
EDA (Exploratory data analysis)
There are three data set in Json format, which includes portfolio.json (containing offer ids and meta data about each offer (duration, type, etc.)), profile.json (demographic data for each customer) and transcript.json (records for transactions, offers received, offers viewed, and offers completed). Those were copied into offer, customer and transaction data frame for better operation.
Here is the schema and explanation of each data frame:
Offer data set with 10 records:
• id (string) — offer id
• offer_type (string) — type of offer ie BOGO, discount, informational
• difficulty (int) — minimum required spend to complete an offer
• reward (int) — reward given for completing an offer
• duration (int) — time for offer to be open, in days
• channels (list of strings)
Customer data set with 17000 records:
• age (int) — age of the customer
• became_member_on (int) — date when customer created an app account
• gender (str) — gender of the customer (note some entries contain ‘O’ for other rather than M or F)
• id (str) — customer id
• income (float) — customer’s income

As the Figure 1 shows, there are slightly more male customers than female customers in customer gender distribution.

In Figure 2, the customer registering distribution is not stable through out years. It met a first jump of numbers around 2016. And it kept flat until the middle of 2017. Then it received the second jump of numbers. However, when the time came to 2018 the numbers of registering came to a marginal decrements. Overall, the numbers of customer registering were in a trend of increasing from 2013 to 2019.
Transaction data set with 306534 records:
• event (str) — record description (ie transaction, offer received, offer viewed, etc.)
• person (str) — customer id
• time (int) — time in hours since start of test. The data begins at time t=0
- value — (dict of strings) — either an offer id or transaction amount depending on the record

Part I: Which demographic groups respond best to which offer type?
There are three different aspects for solving this question, which are demographic groups, responds and offer types. Those are also related to customer, offer and transaction data frames. So, it is necessary to merge those three data frames together (As shown in Fig 3).

Since the responds and group’s demographic are related to the offer type. Additionally, the offer type does not change through entire receiving, viewing and completing processes. We should focus on individual offer type researches, which are researches on BOGO, discount and informational offers. In other words, each offer type would have its own responds and group’s demographic. Due to informational offer can only be viewed, there is no research on its offer completing. The results are shown in blown (Table 1).

For BOGO offer, the customers who completed the offer is younger and have more income with even gender distribution than the customers who viewed offer. For discount offer, the customers who completed the offer is younger and have more income than the customers who viewed offer. Overall, the offer viewed rate is higher than offer completed rate for both BOGO offer and discount offer.


Overall, in Fig 4, the number of viewed BOGO and discount offer is much more than the number of viewed informational offer, which is almost twice more for both BOGO and discount viewed offer. However, Fig 5 shows the difference between the number of completed BOGO and discount offer is small, which is around 2000 offers.
Trending AI Articles:
As a result, the different offer type does have different responds of different groups’ demographic. For example, although the number of completed BOGO and discount offer are close to each other, the offer completed rate and gender distribution are very different. And more detailed responds and different groups’ demographic for different offer type are in Table 1.
Part II: What are the top 5 features that influence those offer reactions?
As mentioned in previous question, there are two type offer reactions: viewed and completed. In order to find top 5 influencers for both offer reactions, two random forest machine learning models were built dedicated to find those influence features. The final results are showed in Fig 6 and Fig 7. Top 5 influence features for offer viewed reaction are ‘time’, ‘age’, ‘income’, ‘social’ and ‘difficulty’. Top 5 influence features for offer completed reaction are ‘time’, ‘age’, ‘income’, ‘duration’ and ‘informational’.


Although those features were selected by machine learning models on different offer reaction, it is amazing to see first three features for each reaction is exactly same. So, it is definitely worth to dig little deeper on those three features. They are ‘time’, ‘age’ and ‘income’, as showed in Table 2 with the values of mean and median.

Conclusion
- For different offer type, the customers with different demographic do response differently (detailed demographic information is in Table 1).
- The customers’ demographic changed dramatically from offer viewed to offer completed for both BOGO and discount offers.
- ‘time’, ‘age’ and ‘income’ are most important features that influence customers’ offer reactions.
- Starbucks could definitely make a better future decision based on the result of this project, if they want to improve the offer reactions for different customers. For example, if they want to improve BOGO offer completed reactions, they should send out more offers that at least available for 410 hours and focused on the customers aged around 58 years old with income around $ 70,000.00 regardless their gender.
The detailed GitHub repo code for this analysis can be found here.
Don’t forget to give us your ? !



Two Things Starbucks Wished to Know before They Send the Promotion Offers Out was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.
10 software development trends of 2020
With the arrival of a new year, a lot of us make resolutions about the changes we want to see in our lives at the nearest time. And the…
Continue reading on Becoming Human: Artificial Intelligence Magazine »
What advice do you give someone beginning to learn data science?
From self-driving cars and robots, bioinformatics, speech recognition to object recognition, neuroscience, and many more — data science is central to the entire organization dealing with any of these.

The data scientist is considered as the best job in the USA for 2019 with $108,000 as a median base salary, plus an attractive number of predicted openings. According to the prediction made by the IDC (International Data Corporation), in 2020, worldwide revenues for business analytics and big data will reach over $210bn.
These statistics are more than enough to motivate someone to learn data science.
If you need some more reasons to learn data science, it’s associated with a huge number of new applications and industries that emerge from the judicious use of massive amounts of data. From self-driving cars and robots, bioinformatics, speech recognition to object recognition, neuroscience, and many more — data science is central to the entire organization dealing with any of these.
But the question is: despite all these attractive career options and the whopping number of people looking to learn data science, why there is still a huge talent gap? Probably the answer is aspiring data scientists overlooking some simple yet fundamental aspects when trying to learn data science.
Unquestionably, in the data science field, much comes down to the core skills like mathematics, statistics, coding, and so on. But those skills alone don’t cut it. In order to learn data science effectively, you’ve to take care of some key aspects as well.
Here, we’ll be discussing the key aspects you must take care of when you’re planning to learn data science to increase your chances in getting your dream job.

Useful advice to keep in mind when you’re planning to learn data science
We hope that by being able to understand the following aspects, you’ll be able to sail through them efficiently and make your path toward a data science career a little bit easier. Let’s dive in.
1- Make sure you truly want to learn data science
Undoubtedly, data science is one of the most promising career options available right now. The salaries are excellent, you get to work on interesting things, and overall a covetous job to a lot of people. Unfortunately, even if you’re passionate about stepping into the field and want to learn data science desperately, you may not be in love with the process. Put simply, if you don’t like the day-to-day tasks that are integral parts of data science professional’s job, it’ll be extremely difficult to maintain the motivation.
It’s important to understand that for most people trying to learn data science, it sometimes takes months before they get to work on full-scale data science projects.
And after spending a couple of months in your effort to learn data science if you realize that you don’t like the process, it can be a huge personal blow. While data science is an excellent profession, there’s definitely a significant amount of frustrations which come with it. So, do your research before you start to learn data science. Try to learn about the tools and tasks a data science professional does, before you actually decide to build a career in data science.
2- Select the appropriate role
This is another key aspect that has to be considered before you start to learn data science. In the data science industry, different types of roles are available — from a data scientist and a machine learning expert to a data engineer to a data visualization expert, and many more. Depending on your preferences, educational background, and work experience, aiming at one role would be relatively easier than another one. For instance, if you’ve work experience as a software developer, it wouldn’t be much difficult for you to become a data engineer. So, before you start to learn data science, it’s important to be clear about what role you want to get into in order to be able to shortlist the skills to hone.
If you’re not clear about the differences between different roles, there’re ways to find them out. These include talking to people working in the industry, seeking mentorship from people, choosing the role which suits your field of study etc. However, it’s important not to just blindly jump on to a role. First you should clearly understand what it requires and then prepare for it.
3- Where to learn data science
Now that you’ve decided on the role, the next step is deciding on where you should learn the required skills from. Because of the huge demand for data science, there’re lots of avenues available these days, from which you’d need to take your pick. Finding material to learn data science isn’t difficult but from where you learn can make a huge difference. Let’s have a look at the most popular avenues so that you can make an informed decision.
- MOOC: With more students enrolling to boost their knowledge, MOOCs (Massive Open Online Courses) are experiencing huge popularity. They offer self-paced courses, usually free to avail, in a huge list of subjects and topics. If you want to learn data science through a MOOC, you can dedicate a couple of hours daily and advance whenever you can.
- Books: This old school method can be your best resource to learn data science if you pick wisely. There’re lots or resources available in textbook format from where you’d need to take your pick in accordance with your requirements.
Despite all the advantages, self-learning methods like the above ones aren’t the best for everyone. Here, it’s quite easy to get demotivated as it’s actually difficult to learn data science. It’ll take a lot of energy, a lot of work, and a huge amount of time from you. If you want to gain real data science knowledge, learning in a true-to-life data environment is immensely crucial. Let’s check out another avenue to learn data science.
- Bootcamp: Bootcamps are the most useful and popular avenue when it comes to learn data science. They offer several professionally designed modules that help you learn almost everything you’d need to become a successful data science professional. Some people may question the depth with which their topics are covered, but the truth is they excel at offering a good introduction and standard level of expertise in all data-related subjects. More advanced levels are introduced when you complete the initial levels, so you shouldn’t be worried. However, before enrolling with a bootcamp to learn data science, you need to make sure that the program curriculum is professionally effective, the bootcamp has a proven track record, it offers job assistance after successful completion of the program.
4- Practical applications are absolutely important
Regardless of the avenue you choose to learn data science, you should always focus on practical applications instead of theory only. While undergoing training and courses, it’s essential to try to explore the real-life applications of the things you’re learning. This would not only help you understand the concepts but also help you get a deeper sense of how those would be applied on real-life. Just be prepared to follow these things meticulously.
- Make sure you do every assignment and exercise to understand the applications.
- If you get stuck somewhere, consider looking at the solutions by people who’ve worked in the field. It’d help you understand the right approach.
- Try to apply your learning on a couple of open datasets. Even if you don’t understand the core concepts initially, you’d get an idea of the assumptions that would help you greatly at the later stages.
5- Join a community
Now that you’ve started to learn data science, it’s important to join a community of aspiring data science professionals. Taking up something new, especially a difficult field like data science, often feel like a bit uphill task when you do it alone, but when you’ve like-minded people alongside you, the task becomes a bit easier.
Trending AI Articles:
Either you can have a group of aspiring data science professionals you can interact with physically, or you can have an online group that has people who are planning/have started to learn data science.
6- Work on to develop soft skills
Though some people think that soft skills aren’t that much important for someone stepping into a highly technical field like data science, in reality, these skills are equally important like hard skills. Soft skills that most of the employers like to see in the applicants include leadership, time management, communication, and collaboration. Soft skills will become highly important when you’ll be working in the field, and thus, it’s important that you focus on improving it at the same time when you start to learn data science.
Conclusion
Finally, you should understand that a good professional is learning always and it has become even more important in today’s dynamic world. Regardless of the avenue you choose to learn data science or the position you’ll be working at, you’ve to keep on learning in order to stay up to date and to grow as a professional. Learning is quite a personal process and there isn’t something that equally works for everyone. Just try the above suggestions out and you’ll surely be able to find out the way to learn data science suited best for you.
Don’t forget to give us your ? !



What advice do you give someone beginning to learn data science? was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.
Should Data Scientists Model COVID19 and other Biological Events
Originally from KDnuggets https://ift.tt/3ay7sKR
Fighting Coronavirus With AI: Improving Testing with Deep Learning and Computer Vision
Originally from KDnuggets https://ift.tt/2VSGVTi
Math and Architectures of Deep Learning
Originally from KDnuggets https://ift.tt/2VO8ygf
Free Quality Machine Learning & Data Science Books & Courses: Quarantine Edition
Originally from KDnuggets https://ift.tt/3aqob2N
KDnuggets News 20:n16 Apr 22: Scaling Pandas with Dask for Big Data; Dive Into Deep Learning: The Free eBook
Originally from KDnuggets https://ift.tt/34THBfk
Free Dialogflow Workshop with Chatbots Life & CoCoHub
April 23rd at 10am PST

Hope you are healthy and well.
Due to popular demand, and the overwhelming number of sign ups for our previous workshop, we are doing another 1hr Free Dialogflow Workshop.
In this workshop, you’ll learn how to develop a simple bot or voice app using Dialogflow and then give it ‘Super Powers’ using pre-build conversational components using CoCo Hub!
Workshop Details:
Date: April 24th at 10am PST
To Register: https://www.bigmarker.com/chat…
This is the last free workshop before the Chatbot Conference.
Looking forward to seeing you there!
Cheers!
Stefan
PS: By keeping the rooms smaller we can focus more on each individual. As a consequence, we run out of seats quickly.

Join us on April 28th & 29th ONLINE


Online event Format:
1. On Demand Videos: We will make on-demand presentation available on a rolling basis as we receive them from our speakers.
This includes, fire-side chats, presentations and webinars!
2. April 28th | Live Q&A: On April 28th, we will host a Live Q&A with our speakers. This is the perfect time to ask our speakers questions and go in depth.
To get the most out of all of the content, please watch their videos first in the on demand sections.
3. April 29th | LIVE Certification in Dialogflow Workshop: On April 29th, we will host a live Dialogflow workshop with BotCopy and CoCoHub. You will build a fully functional bot using NLP/NLU, along with pre-build conversational components from CoCoHub and launch it!

April 29th: Certificate in Dialogflow

Build an AI Powered Chatbot for Voice, Web, or Messenger in our full day workshop using Dialogflow and CoCo.
Morning Session
- Project Strategy
- Learn how to use Intents & Entities
- Developing 10 FAQ conversations
- Launch your Bot
Afternoon Session
- Improving your Design with Fallbacks, Welcome messaging, user segmentation, etc
- Master Design Principles
- Use CoCoHub to add pre-built components and take your bot to the next level.

Free Dialogflow Workshop with Chatbots Life & CoCoHub was originally published in Becoming Human: Artificial Intelligence Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.

