How to cheat at Machine Learning by not owning a cow

Gillian Armstrong
Aug 12 · 8 min read

My life hack to use Machine Learning without doing all the work…

Image for post
Image for post

Everybody is talking about Machine Learning. And talking about learning Machine Learning. If you work in software you’ve probably realised how important it’s going to be for the future of all we build. And if you don’t have a ML background, you may already be panicking about how you can learn enough about ML to start using it in your applications.

What if I told you that the amount of ML knowledge you need to get started is very, very little, maybe even none. In the same way that the Cloud is commoditising Infrastructure, it’s also both democratising and commoditising AI and ML.

I work mostly in Amazon Web Services, so the examples I’ll give below are in AWS, but all the big Cloud Providers, and lots of small start-ups as well, are providing an array of Services and Tools for Machine Learning.

This is the AWS Machine Learning Stack:

Image for post
Image for post
AWS Machine Learning Stack

You’ll see that there are a number of levels, starting at the top with fully managed services, moving into managed tooling and then down into the frameworks and infrastructure that you can use to make completely custom solutions.

In the top layer there are a range of AI Services. You can use many of them completely out of the box with just an API call to do things like Image Recognition, OCR, NLP and lots more. Or you can start to customise them with your own data, creating services that can recognise your company logo in photos, or identify or transcribe vocabulary specific to your use case.

In the next layer you’ll find managed tools and workflows for building ML Models brought together through Amazon SageMaker. You have a lot more flexibility, but still have some of the heavy lifting done for you.

At the bottom layer you have total freedom. In the managed services you are limited to the functionality it provides in exchange for having some of the complexity and work removed. In this layer however, you can choose to select and assemble things exactly the way you want, you can create things completely from scratch, you have every knob and lever at your disposal. However, you also need to do the heavy lifting yourself now.

Increasingly in Industry it has become the belief that if you aren’t working in that bottom layer, writing your own algorithms and models from scratch, it’s not real ML. It’s… cheating.

While you mull that over, let me tell you a little story…

The Parable of the Butter

Jon stared at his toast. “I should really learn how to make butter,” he thought. “Everyone is talking about it, and my toast would be so much better with butter.” A quick google later, he had a list of things he was going to need. A little research into the best churn, and working out how to get the best cream to use. “Looks like I’m going to need raw milk to get that great cream… so guess I’m going to have to buy a cow too,” he mused. More things to research!

Image for post
Image for post

Getting a cow was a big job in itself, but he had realised that he also needed somewhere to keep the cow, so land and a barn had been purchased. He spent lots of time learning about milking and looking after a cow, and finally the day came when he felt he knew enough to actually purchase a cow. Now he had his own cow and the milk he needed, he could skim off that cream and get down to churning his own butter. And it was fun learning about it all even though it was hard work. And his morning toast was just perfect now.

Image for post
Image for post

One day while he was out for a walk he bumped into an old friend.
“Jon!” said Kirsten, “Just the man. I’ve been thinking about learning to make butter, and I heard you had a cow. I’d love to buy some raw milk from you.”
Jon looked at her. That seemed a bit like cheating… but he did have more milk than he needed. “Ok, Kirsten, but you’re kind of shortcutting the process.”
Kirsten smiled, “Jon. It’ll still be butter.”

Image for post
Image for post

Later that week, Jon called round at his friend Emmaline’s house. She was busy baking an array of cakes and pastries. Another friend, Deborah, was sitting at the kitchen table with a cup of tea and carefully selecting a slice of cake.
“You made all these things yourself? How do you find the time?” Jon exclaimed.
Emmaline smiled and offered him cake. “Still keeping busy with your butter making Jon?”

Deborah sighed from the table. “We tried butter, but it turned out my husband is lactose intolerant.”
Jon was shocked, “That is a really expensive mistake to make!”
Deborah looked at him. “Jon, butter isn’t that expensive.”
“C’mon Deborah, all that time making it, and the upkeep of the farm…”
“Jon. We were just trying out butter — why on earth would I buy a farm to do that? They sell butter at the shop.”
“You just… buy the butter?”
“Of course — “

Image for post
Image for post

Emmaline laughed, “Me too!”
Jon is horrified.
“Jon, how would I have time to experiment with making all these recipes if I was looking after a farm. Do you have time to do that?”
Jon stared at her “No, but my butter is getting better and better the more work I put into it. Are you saying that no one should have a farm? I should just buy my butter?”

Deborah set down her tea. “Jon, if no-one owned a cow, no one would have butter. We’re just saying that not everyone needs a cow. Some people just want to try butter. Others want to do lots of experiments really quickly using butter. It wouldn’t make sense to start with buying a cow when you didn’t know if you really needed butter, or what you would use butter for yet.”

Jon looked at them, “So, you would buy a cow later when you knew those things?”
Emmaline shrugged. “Maybe. Maybe not. At the end of the day, it’s all butter whether or not I made it myself. If just buying it works for me, then maybe I’ll never own a farm. It’s still butter. The most important thing is what you do with it.”
She smiled. “Like make cakes.”

Image for post
Image for post

Jon headed home that evening with several generous slices of cake. He had a cow to milk. And a lot to think about.

Machine Learning as a Spectrum

So what if we viewed Machine Learning in the same way. Let’s say that Machine Learning functionality is our butter. Now our stack looks like this:

Image for post
Image for post

At the top layer you have Managed AI Services — the equivalent of just buying your butter from the shop. At the next layer you are churning your own butter — putting some of the work in, but getting some things handled for you. At the bottom layer you have your own cow, you now have full control over the whole process, but it takes a lot more skill and investment.

Is it cheating to get your butter at the shop? Using Managed AI Services where it works for you isn’t cheating — it’s sensible. And it’s still AI, even if you didn’t build it all from scratch.

So, although I titled this article “How to cheat at ML”, I’m going to say that it isn’t actually cheating to use AI Services to start to figure out Machine Learning, or to quickly experiment or build rapid prototypes… or to integrate into your actual applications and use forever. I’m going to encourage you to take a look at them each time you have a use-case, and make the decision to move on from them either if they don’t provide the functionality you need, would be too costly for your purpose, or the functionality is a key differentiator for your company and you want to have full control. The most important part of any ML project is what and how you are using it — the most impressive ML model is the world is useless unless you actually apply it to something. Like butter , ML is designed to enrich and enhance other things, not just stand alone.

I would recommend this way of approaching problems even if you are a ML Expert. It’s ok to know how to make butter from scratch, and still choose to buy it sometimes. And if you are a total newbie? Well, you’re still allowed to have butter even if you don’t actually know how to look after a cow.

So, go try out some new AI Services. And if anyone tries to make you feel like you are cheating, tell them that although you appreciate the value of knowing how to look after a cow, right now you have cakes to make.

If you want to learn more about AI Services I would recommend you check out the documentation and tutorials for Amazon, Google and Azure.
To get a quick dive into the various Amazon AI Services you can join the
AWS ML Power Hour each Thursday night on Twitch and meet real-life Jon and Kirsten.

You can also reach out to me on Twitter @virtualgill if you have questions or just want to connect!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

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