Getting Started With Machine Learning (No, "Practical" Machine Learning!) (Part 2)

Getting Started With Machine Learning (No, "Practical" Machine Learning!) (Part 2)

This post is part of a series of blog posts on hands-on introduction to machine learning, based on the course Practical Machine Learning Course from The Port Harcourt School of AI (#pmlcourse).

Hello, and welcome!

This blog post is the 2nd part of our introduction to the Practical Machine Learning series. Part 1 of the blog post series can be found here.

Like many others, you might have been frustrated by lots of tutorials out there that introduced Machine Learning but no real-world, practical substance attached to it. This series of blog posts are meant to help you learn Machine Learning by relating it to real-world use-cases while thoroughly making you aware of the challenges that happen in machine learning projects in actual business scenarios.

In this blog post, we introduce examples of Machine Learning around you, how to identify problems that can potentially be solved by machine learning, as well as how to identify pain points in businesses. We also go through the entire Machine Learning workflow while pointing out the real-world challenges that each of the phases of the ML workflow encounter. The rest of the series will walk you through a real-world project where you will see all these in action.

Prerequisite

There are no prerequisites for this particular post expect the first part of this series of blog posts.

Conventions Used In This Post

  • "🔊 Audio: (COMING SOON!)" If you are very busy and would love to learn the main points from this article while doing your chores (or working out), we provide you with an explanation of the key points from the article. We also state sessions where you may have to go through the code snippet and try things out in your IDE or at least look through the article to understand the point better.

  • "📺Video:" We complement this blog post with embedded videos on specific topics to help you blend your learning. The videos serve as complements to the articles that follow them.

  • "❗Main point": If you are in a hurry, you should read the text under this convention.

  • "💡Insight:" If you want to learn more about that specific topic, you can deep into the text under this convention.


Table of Contents

  1. Recap of The Last Blog Post And Other Useful Additions.

  2. What We Expect You To Know By The End of This Post.

  3. Examples of Companies Using Machine Learning To Solve Problems and How They Use Machine Learning.

  4. How You Can Identify Problems That Can Be Solved With Machine Learning.

  5. Conclusion

  6. Recommended Resources


Recap of The Last Blog Post And Other Useful Additions.

Note, this recap might also include main points that were not stated word-for-word in the previous article.

In the previous article, we learnt that;

  • Machine Learning is a technology that helps computers learn from data using standard learning (or statistical) algorithms so they can answer questions related to such data and make predictions based on insights they get from the data.

  • Although we did not cover this in the previous article, by standard learning (or statistical) algorithms, we mean ML algorithms are mostly ones we repeatedly use. For example, in traditional programming, you may need to build software with very specific algorithms to perform specific tasks, but with ML, you can use just one algorithm to perform various tasks because you only have to train it with the right data and it will learn from it. The same learning algorithm that is used to forecast weather may also be used to analyze the stock market trends or forecast demand for Uber rides in a given location.

  • With Machine Learning, you don't write (or code) a software program to perform specific tasks; you train the software program to perform such tasks. This is why you have to be very clear on what you are training it to do—the objective you want the machine learning algorithm to perform well on.

  • Programmers write (or code) these standard learning algorithms but the computer applies these algorithms to learn from data and construct its own rules on how to solve problems and answer questions related to such data.

  • Machine learning works because lots of data are being generated by users and systems (other computers or machines) every day, alongside the improvement of learning algorithms, and the availability and accessibility of hardware and software computing resources for the algorithm to learn.

  • There are different types of systems that enable machines to learn. It is crucial to consider all these systems if you want to successfully employ machine learning to your business processes.

  • Any organization or business that has lots of data and is looking for better ways to understand and utilize it can benefit quite well from this technology.

  • There are a number of challenges that need to be carefully considered in order to successfully apply ML to a business process or organizational need.


What We Expect You To Know By The End of This Post.

  1. Understand how some large and small companies are using ML to improve their business process.

  2. The rule-of-thumb for identifying problems that Machine Learning can solve.

  3. How you can identify if Machine Learning is a suitable technology for solving your business challenges.

  4. What an AI and data strategy is


Examples of Companies Using Machine Learning To Solve Problems and How They Use Machine Learning.

❗Main point:

There is a belief that it is only companies like Google, Amazon, and so on with lots of resources and money that can successfully apply Machine Learning to solve their business problems but there are a lot of small to medium-sized businesses that are applying Machine Learning to solve their business problems. It just depends on the AI and data strategy they choose to implement based on their current level and resources. (I will explain this in the next section.)

📺Video:

Examples of AI and Big Data in Small Businesses.


💡Insight:

To show that it is not just high-tech, billion-dollar companies like Google, Amazon, Netflix, and Facebook that are applying AI and Machine Learning to their processes, I will list various applications from large companies (like Google, Uber, and so on)away from Africa, as well as companies in Africa leveraging artificial intelligence and Machine Learning technologies to solve their business challenges.

Most of the applications we will cover here are externally-facing (meaning they directly affect users of the products). You can also make your own personal search on companies that have not been listed here like LinkedIn (or Microsoft).

Large Companies and How They Are Using AI.

Google

📺Video:

Some ways Google uses AI.


Google is arguably the world's leading AI-first company ("AI-first" meaning most of their products and services are driven by artificial intelligence technology).

They apply AI and Machine Learning in core products such as Google Search where they have trained a Machine Learning system to integrate alongside other traditional systems to improve your search experience.

You may have noticed that the results Google Search returns for you have significantly improved over the last couple of years;

  • You may notice that sometimes you know what you want to search for but you cannot put it in correct words but you search for it anyway and it turns out that the search results are exactly just what you are looking for.

  • Maybe sometimes you are trying to search for something and while typing the terms Google Search is already recommending possible search terms for you.

  • Or you realize that you can search directly within images in Google Search by dragging and dropping the image to the search box and it is able to give you relevant details about the image.

These advances in Google Search have all been enabled by Machine Learning. Their search algorithm is called Rankbrain and it is a combination of various machine learning models that understand speech (voice commands), text, images, and so on, that also integrates with their traditional search systems.

Other ways they improve their products include the near-accurate transcription (CC or "Closed Caption") of spoken words in YouTube videos or other products such as Google Meet and Google Pixel Recorder App.

The use of Google Assistant as a virtual assistant to perform things like calling your Dad (or Mom, or friend), checking your calendar, checking your email for appointments and so on.

Amazon

📺Video:

Amazon is using AI in almost everything it does | CNN Business.


Amazon is undoubtedly the biggest eCommerce company in the world right now. Apart from the various ways, they apply AI as listed in the video above, 35% of Amazon's revenue is generated from using Machine Learning to power the recommendations according to McKinsey they make to their customers.

What I want you to note here is Amazon's strategic application of Machine Learning. They use AI and Machine Learning to primarily improve the experience of customers which is in line with their primary business objective of being customer-centric.

Netflix

📺Video:

How Netflix Uses ML and AI | Simplilearn.


Netflix's core business is to get, host, and provide movies for their customers. To complement the use0-cases already stated in the video above, Netflix provides movies to its customers by optimizing the experience of watching movies using Machine Learning in two (2) ways;

Firstly: By recommending movies and TV shows a user might likely watch based on the past movies they have watched and perhaps rated well too. They also recommend to you movies where other users that have similar watching patterns to yours may have watched too.

Movie recommendations at Netflix have increased their revenue by a staggering 75%, according to McKinsey.

Secondly: By optimizing the streaming quality for the movies they provide to their users. They do this in various ways but two of which are; using results from their recommendation engine to store (or in technical terms, "cache") some part of a movie you might likely watch on your device when you have a strong network connection.

And the other is using ML algorithms to predict when your network will be more stable than it is so that it can store (or in technical terms, "buffer") the videos so you will experience little to no delay in both streaming experience and quality.


Other large companies that use Machine Learning include Facebook where it is majorly used in its core business of connecting people together and more recently advertisement using Machine Learning to suggest friends you may know to you, automatically tag friends in photos you upload, and generally use ML to decide what should come up in your newsfeed. You can read more here.

Apple also uses AI and Machine Learning for its famous virtual assistant software Siri (you may know her). They also use what's a mix of what's called on-device and cloud-based Machine Learning for the portrait mode you seamlessly use with their phones today. On-device means the Machine Learning models work on the phone with or without an internet connection.

So yes, that isn't entirely an improvement in camera hardware technology but with Machine Learning's computer vision capability to spot the human(s) in the picture and blur the background in real-time (almost immediately).


Companies in Africa and How They Are Using AI.

OneFinance (Carbon)Located in Nigeria.

Carbon (formerly known as PayLater) uses Machine Learning to decide which customer is in need of a loan and the customers that should be given a loan based on the data they have on those customers. This has enabled their business a lot and improved customer loyalty and experience in taking loans. It used to be a lot of pain from applying for loans to getting feedback and to getting approved, where it took days before that could effectively work.

One FInance.png Image source.

IndicinaLocated in Nigeria.

Indicina's vision is to unlock the massive African consumer credit opportunity by enabling much-needed risk innovation. They use Machine Learning techniques to enable their client customers with credit opportunities by providing credit scoring for these customers so that they can be able to lend money through digital channels without stress.

They also use Machine Learning to help their clients by building algorithms that identify fraud into their clients' lending channels so their clients can focus on providing calculated and risk-averse credit opportunities to their own customers.

They also use Machine Learning to build recommendation systems for their client products.

business-1037739_1920.jpg Image by InspiredImages

PPS Financial Services—*Located in South Africa.

PPS's primary business objective is to improve the experience of their customers when selecting an insurance investment. This, of course, sound like a job for Machine Learning's recommendation capabilities. PPS improved sales by 5% by building a Machine Learning-powered recommendation platform, and this was just one part of their business.


The main theme surrounding all the stories of these companies and how they employ machine learning is that they; specifically consider how the technology can improve their primary business objective and how it can improve the experience of their products or services users.

❗Main point:

To reiterate a point (once again), an organization that has lots of data and are looking for better ways to understand and utilize it can benefit quite well from this technology. But one thing you should know is that although data is popularly termed the "new oil", it can also prove to be a snake oil too. This means that lots of data don't necessarily mean the right data that can solve some of your business challenges. Take note!

You have seen all these use-cases, I think its high time you know how to identify problems that can be solved with Machine Learning.


How You Can Identify Problems That Can Be Solved With Machine Learning.

📺Video:

How to Apply AI in Business | Raj Ramesh.


❗Main point:

There is a simple rule-of-thumb that I use to identify problems that can be solved with Machine Learning, it may perhaps be helpful for you too: Any problem that involves some form of pattern recognition, then Machine Learning can probably do a better job (or at least close to your level) at it than you are doing.

It is innate in humans to recognize patterns in our experiences so we can base our decisions on them. Machine Learning algorithms base decisions off the lots of data it learns from.

Anywhere this trait of pattern recognition is found as well as work that is involves repeated decisions such as inputting data, attending to customers at the register, determining which customers will buy new products based on the products previous customers have bought, e.t.c. Basically, anything that is repeatedly done has the potential to be solved by Machine Learning.

💡Insight:

To think about the problems ML can solve problems is to think about problems ML cannot solve. I will explain further.

To think about the problems ML can solve problems, you have to think about the different types of Machine Learning systems and how they learn. This would give you a clue into the various problems these standard learning (or statistical) algorithms can solve.

  1. Supervised Learning ML Systems

Recall from our last blog post that supervised learning systems require labeled data (meaning both input and output variables are provided) to successfully train a model for, Under Supervised Learning, there are mainly two ways ML can solve problems with supervised learning technique and these are; Classification and Regression.

Classification vs Regression Image Source.

With Classification, you are training the computer to answer questions based on the categorical label of the data. When we mean categorical, we mean when there are classes such as Yes or No, True or False, Paying Customer or Not Paying Customer, Edible Product or Not an Edible Product, and so on.

Altough there are various types of classification systems, they can majorly be divided into three that you'd most likely use; Binary classification, multiclass classification, and multi-label classfification.

classification (Bin and Multiclass).png Image Source.

Binary Classification is a type of classification technique where algorithms train and predict on just two (2) classes of labels "Cold" or "Hot", "Yes" or "No", "0" or "1", "True" or "False", and so on. These algorithms deal with answers to labels that are in categories.

When It Works

The binary classification works when your Machine Learning algorithm is only going to answer questions that require just two answers. If there are more than 2 answers, then we move on to the next type of classification—multiple classifications.

BINARY CLASSIFICATION.png

Multiclass Classification is a type of classification technique where algorithms train and predict on more than two (2) classes of labels such as High-paying customer", "Low-paying customer", "Middle-Level Paying Customer". An example of questions and possible answers an ML model can provide is below.

When It Works

The multiclass classification works when your Machine Learning algorithm needs to answer questions or make predictions that have more than two (2) answers to them or two categories. For example, which of my products will sell more today? An ML algorithm could return predictions that look like; There's an 80% chance that bags will sell more today, 60% chance that umbrellas will sell more today, 50% chance that shoes will sell more today, and so on. I hope you get the idea.

Multiclass.png

Mult-label classification systems are different from binary and multi-class classification systems because the algorithms can on various classes (like multi-class) but they can also output more than one label per class.

For example, "Are there objects in this image?" If yes, identify the various objects in the photo based on the labels we have trained them on such as Bags, Hats, Head Tie, Person, Mannequin etc in a fashion store.

They are also used by Facebook to identify who are in a photo for automatic tagging. For example, when you upload an image the algorithm runs through the image and asks itself "Are there people or objects in this photo?" If yes, then it begins to identify what the objects or names of the people are then does the automatic tagging.


Regression works differently from classification. With Regression, you train the ML algorithms on what's called "continuous labels". These labels are mostly numbers and are not definitive.

For example, you might want your ML algorithm to help answer questions on how much your customers are willing to buy a particular product.

You will train the ML algorithm on data on previous purchases made by customers (input features) and how much they bought those items in the past (label), then when you use your ML algorithm to make predictions or answer the question, it tells you that a customer is likely to buy this product for the price of 3,500.00 Naira. You see that it doesn't give a definitive Yes or No answer, it only gives an answer that is continuous in nature (meaning it could be more than 3,500 of less than that).

Regression.png

❗Main point:

Classification systems as a supervised learning algorithm work well on categorical labels.

Regression systems as a supervised learning algorithm work well on continuous labels

Can Machine Learning Solve Your Business Challenge?

📺Video:

So you want AI for your business. Where do you start? | Raj Ramesh.


To assesss the feasibility of Machine Learning projects for your business, it is often beneficial to approach ML first with a problem you think it can solve before exploring other areas such as applying the technology to discover what your business can improve on or discover new market opportunities.

Solving business challenges with Machine Learning are most times not often a safe-bet for businesses so it is best you carefully analyse and understand if ML is right for your business use-case before delving further into the exploration of the technology for your project.

There are two (2) questions I'd suggest you ask;

  1. What is the problem I am trying to solve?

  2. Does solving this problem involve any form of pattern recognition (learning some certain concepts from a knowledge-base or data) or repeated work?

If you have identified what problem you want to solve and "yes!" is your answer to the second question, then you have been able to frame the end-goal of your problem in a way that can be passed to an ML system but before we go on, we must evaluate the feasibility of the problem being able to be solved by Machine Learning.

ML-powered use-case based on the difficulty of the problem as opposed to the ease of solving the problem (which other simpler methods like traditional programming or so can help us solve), and the specificity of the problem as opposed to its openness or broadness (where we cannot effectively measure the performance of the ML solution we are trying to build).

The best ML models are those ones that are although difficult but they are specific enough to be measured.

Sweet Spot for ML.png Idea gotten from Machine Learning for Business Professionals Course on Cousera.

This step helps us properly assess the feasibility of our ML project.

An example of an open or broad problem for ML would be; predict whether or not to open your store today. Altough this is a good problem to solve, it is too broad to be solved by ML. There are no specific factors to consider to tell whether to open your store today or not because it could be rainy or sunny, peak work hours or not, pandemic crisis or not, e.t.c There are no specific factors to pin-point why you should open your store today or not.

On the other end of the spectrum of an example of a specific problem for ML would be; predict if I will sell 5 pieces of an item. The emphasis on the number is too specific and ML models might fail trying to optimize for such narrow performance.

An example of an easy problem for ML would be; predict if I will make any sales today or not. I mean this would be quite easy for traditional systems that can average out the previous days you have made sales and come up with a prediction—that doesn't require ML.

On the other end of the spectrum of a difficult or impossble problem for ML would be; Predict the revenue growth of my store in 4 years time. Given that the future is very uncertain with so many factors that plays into revenue growth, not to talk of a forecast of 4 years, it will be impossible for the ML model to come up with an accurate prediction.

The sweet spot for problems that can be solved with ML would be; predict if a customer would come back to purchase an item from the store. We can see that although it is quite difficult to predict human purchase nature, it is also very specific to a particular business objective of improving sales or customer loyalty.


After determining the sweet spot, a great way to assess of this "sweet spot" is to ask some couple of questions. I have provided an "ask-sheet" for you to keep in handy and we also use the

Step-wise Questions to ask when exploring problems for ML

Using our "sweet spot" from above to fill in the question blanks, we have;

Q and A.png


Phew! I hope you were able to understand how to identify problems that can be solved with ML, and have developed an expertise on identifying business challenges that can be solved by ML. You are well on your way to becoming an ML Engineer. Congrats!

The next step is to figure out what how to solve that particular problem with ML. This is where most of the action from understanding the problem to collecting data to building the model and eventually deploying it happens.

Before diving into building Machine Learning apps and algorithms, there's something you should know, The trick to successfully developing an AI/ML and data strategy depend largely on the common challenges a machine learning projects encounter that we discussed in the previous article. You need to make sure you understand the limitations of your current business before you begin the process of building.

A company's AI strategy involves how such company wants to leverage AI technologies to solve their business problem after assessing its feasibility. A company's data strategy is how that company intends to collect data that is both relevant to their current needs as well as their future needs. Most times, the AI strategy and data strategy works in tandem with each other.

In some other article (not necessarily in these series of articles), we will see how we can develop an AI and data strategy for a fictitious company. But before then, you can download Andrew Ng's AI Transformation playbook that can prove to be very useful for you.


Conclusion

We learnt a lot in this article. Let's recap;

You learnt some examples of companies using AI and how they are using it; both large and small companies. You learnt how to identify problems that can be solved by ML, you also learnt how to assess if a problem can be solved by ML or not.

In the next article, you will get an Introduction to Standard Machine Learning Methodologies, start-off our ML project with a real-world use-case we will work on for the rest of the series of blog posts. We will frame the problem and see ways we can get relevant data to help us solve such problems.


  1. For additional resources, You can refer to chapter 1 of one of the recommended books for this course "Hands-On Machine Learning with Scikit-Learn and TensorFlow".

  2. Andrew Ng's AI Transformation playbook.


Let us know if you have any feedback on this post (typo, we missed sometimes, claims are wrong, and so on) in the comment section. We take critique and complements well. :)

Till next time, stay safe. 💚💚


If you also enjoyed this post, do leave a reaction 🔥 to the story, hit the like button 👍🏽, and share 📩 it with your friends that may be interested in learning. See you soon!