Image for post
Image for post

So, You Wanna Leverage AI as a Solution? Five Questions to Get You Started.

Last week, I finally wrapped up the capstone project for my Udacity Machine Learning Engineer nanodegree. Since I wrote a crazy long post for that (which you can find here), I’m definitely not going to recap that all in this post, but the basic gist of the project is that I leveraged fabricated customer / event data sourced by Starbucks to provide insights on how Starbucks could better serve its customers through its Starbucks Rewards program.

(Oh, and btw — If you’re not aware, machine learning is simply one “branch” of artificial intelligence (AI). AI is very much a blanket term that covers a lot of different computer intelligence solutions. We won’t cover that in this post, but I thought it necessary to call this out for my friends new to this field.)

Now… there were a lot of approaches I could have taken, but I opted for a less complicated, easier to understand implementation of an unsupervised hierarchical clustering algorithm. Sounds fancy, right? Well, friends, let me pull back the curtain on how much code I actually had to write to get that working.

Image for post
Image for post

Aside from one or two extra lines not pictured here importing the Python packages I used, this is it. So what, we’re looking at like… four lines max of actual coding the machine learning piece itself? Of course, there was a LOT more coding to get the dataset analyzed and prepped for this point, but my point here is simple: Implementing the AI solution you want can be pretty simple IF you begin with having a thorough foreknowledge of what you precisely want to do.

That’s a big “if” though! You can’t just jump into the deep end of testing out different AI solution types because . My Starbucks Rewards project had a simple AI implementation because I took the time upfront to understand what I was really wanting to do.

So, friends, that’s what we’re going to look at more closely in this post. I’m going to provide you with the same questions I asked myself in my capstone project so that you can understand how you might leverage an AI solution, even if you have no idea what that AI solution may be. Heck, you might not even know how to write a single line of code! These are intentionally business-oriented questions because at the end of the day, we’re looking for a business solution to a business problem. And it just so happens that we can now consider AI options as that vehicle to get us from point A (business problem) to point B (business outcome / solution).

Okay, let’s get into the questions!

1. What is my end goal?

Kicking off this list for a reason, it’s good to begin with the end in mind because, frankly, many solutions do not need artificial intelligence at all to function well. Some things can be solved with plain, old “if, then” programming. So if you find yourself wanting a solution for something like a very defined, binary issue, you probably don’t need AI.

Likewise, there are many solutions that aren’t necessarily suitable use cases for AI. I’m thinking about stuff like serving as a fashion stylist or music artist. I’m not going to say it’s impossible to use AI in these cases because we have several cases where AI has done some pretty incredible things. But chances are that if you got into a creative field, you did it because you and your followers enjoy your work equally. It’d be like if I created an AI for myself to play video games for me: what’s the point?

Again, keep in mind that AI isn’t magic. Far from it, AI is essentially advanced statistical analysis that makes best guesses on future events based on similar past events. And you have to get crazy specific with the computer to even get a simple AI solution working! Even out-of-the-box services like AWS Rekognition still require that you know specifically what you want out of it. Trust me folks, for many of the use cases you’ll want to explore using AI for, this prep work will often leave you asking yourself the question, “Now why again did I think AI was the right solution for this problem…?”

2. What data do I have to work with?

The way AI works is basically advanced pattern recognition to infer future events based on past events. That said, you’re going to need a lot of data from past events in order to train a predictive AI model that does what you want it to do. Ideally, you’ll already have the data on hand that you need, and it’ll also hopefully be tidy and clean. (I can’t help but throw in plugs for data management any chance I can get.)

If you don’t have the data on hand, you can always go out there and get it. This can be either creating it yourself by gathering metrics on your website as customers browse for this or that. Or there are also a lot of great, free datasets to play around with on things like Kaggle or baked right in to the popular Scikit-Learn development package. Although, if you do this, you should probably keep the next question in mind…

3. What ethical ramifications are there with this data?

I recently sat in a brief presentation of somebody demonstrating how we can track customer behavior in a way that was totally foreign to me before: tracking mouse movement on a website. The presenter demonstrated how it was possible to write some code that would track a user’s mouse movement in real time, and taking it a step further, he noted that it would be possible to use that for AI algorithms to define customer personalities based on this mouse tracking. This sounded nuts to me, but my friend sitting next to me with a Master’s degree in Sociology told me it was totally feasible thought. And then we laughed and agreed it was super creepy.

Now, we can split hairs on whether or not that particular example is necessarily unethical, but there are definitely many cases of clear unethical practice. Things like Facebook selling user data, obtaining prior health data to deny healthcare coverage, and being careless with customer financial data are all pretty clear cut cases of unethical practices involving data. For borderline ethical inquiries, the easy guideline to follow is to not do whatever you’re thinking about doing. (Your friends in the legal department will probably thank you later!)

4. What is my risk threshold?

No AI solution is 100% perfect. Given that artificial intelligence is basically advanced statistical analysis, there is always going to be some margin of error, even if it’s super small. That said, you need to set project a risk threshold, and this is super important to determine upfront before even looking at your data.

Risk thresholds can wildly vary between use cases. For example, if you’re designing an AI solution that determines whether or not an email is spam, then you might set a 95% accuracy threshold. After all, if only 5% of spam email slips through the cracks, that’s probably not a big deal. But let’s say you’re building AI for self-driving cars. Now, that 95% success threshold isn’t that great. Can you imagine 5% of the cars on the road steering into oncoming traffic by accident? I don’t know about you, but I’d probably never step foot in a car again!

And as noted above, you have to set the threshold upfront. Otherwise, you might be prone to try fudging your findings to say, “Well… I suppose we could let this slide.” That’s a slippery slide to less and less optimal AI solutions, and in cases like the self-driving car example, we’re literally talking about life and death here. Setting that benchmark upfront leaves no wiggle room for sticky ethical dilemmas.

5. How do I keep my AI solution performing optimally as time passes?

AI decay is a real thing, so it’s important to keep your predictive models up-to-date over time to make sure your solution is functioning properly after a month, week, year, or decade. A great example of this is Face ID in the newest iPhones and iPads. If you’re not familiar with it, it is the mechanism that allows you to unlock your device simply by looking at it. (Replacing the former Touch ID thumbprint mechanism.) Apple noted when they first announced this feature that the AI behind Face ID would update with you over time as your body naturally ages. I’m guessing the algorithm tweaks itself every time you unlock your device.

Of course, environments change all the time. Society is radically different than it was even 50 years ago, so if we tried keeping the same AI solutions to help us underwrite car insurance, develop actuarial models, or monitor for system performance need, we’d have a lot of really poor results. By constantly keeping your AI solution tuned up with recent data, you ensure optimal outcomes over time. If, for some reason, you don’t have the means to keep your AI solution tuned up, it’s probably not worth initiating in the first place.

Okay friends, so there we have it! We definitely could go further, but I think this small set of questions will shed light very quickly on if your business problem merits an AI solution. At the end of the day, think of it like this: AI is just another shiny tool in your toolbox. If the screwdriver you’ve been using for years gets the job done easily, forget about that fancy power drill. Don’t let the “sexiness” of AI make you feel like you just HAVE to use it. In my opinion, it’s a little overhyped.

I’ll leave you with this… whoever came up with terms like “machine learning” and “data scientist” has a great marketing background! *wink*

Written by

Machine learning engineer by day, spiritual explorer by night.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store