Machine learning: A sneak peek into the future of AI Alex, June 9, 2023June 13, 2023 Imagine sitting with your friends at your favorite coffee shop. You’re all chatting, laughing, sipping your lattes, when suddenly, your tech-savvy friend starts talking about machine learning. You’ve heard the term before but don’t exactly know what it is. Well, my friend, sit back, sip your coffee, and let me tell you all about it. What is machine learning? Let’s start simple. Machine learning (ML) is a method of data analysis and a branch of artificial intelligence. It’s all about letting a computer system learn from the data it’s fed so it can make decisions or predictions on its own. You know how we humans learn from our experiences, right? Well, machines can do the same! Imagine your computer as a curious child who absorbs every bit of information you feed it and learns from it. Intriguing, isn’t it? How does machine learning work? To understand how ML works, imagine teaching a toddler how to recognize a cat. You show them various pictures of cats, point to each one, and say, “This is a cat.” Over time, the toddler starts recognizing cats, even those not shown in the initial pictures. That’s basically what machine learning is about. ML, in essence, is about teaching computers to learn in the same way we humans do – by taking in data (or experiences), recognizing patterns, and making decisions based on those patterns. Let’s use our earlier example of a toddler learning to recognize a cat, and expand it further. Imagine you have a toddler, and you want to teach them not just to recognize cats, but also dogs. You start by showing them various pictures of cats and dogs. When you point to a cat, you say, “This is a cat.” And when you point to a dog, you say, “This is a dog.” Over time, the toddler starts to recognize both cats and dogs, even those they haven’t seen before. They start to notice and understand that a cat has different physical features. The cat is usually smaller, has sharper ears, and a long tail, while a dog is typically larger, has rounder ears and wags its tail. They’ve essentially learned to distinguish between cats and dogs by recognizing patterns and features. Now, let’s take this scenario to a machine learning context. Instead of a toddler, you have a computer program. Instead of teaching it with your voice, you provide it with a large number of labeled images – pictures of cats labeled as ‘cat’ and pictures of dogs labeled as ‘dog’. This is your data. The computer program, or ML algorithm, then processes this data. It studies the features of each image and its corresponding label, and begins to identify patterns – what characteristics do all the ‘cat’ images share, and how do they differ from the ‘dog’ images? After sufficient training on this data, the algorithm becomes capable of accurately predicting the label for a new, unseen image. If you show it a picture of a cat it’s never seen before, it can correctly identify it as a cat based on the features it learned during training. This prediction, “Is this a cat or a dog?” is the output of the ML process. Machine learning isn’t just about recognizing cats and dogs, though. This same process can be applied to a vast range of problems. From helping autonomous vehicles recognize pedestrians and other vehicles, to enabling email services to identify and filter out spam. From teaching recommendation systems, like those used by Netflix or Amazon, to suggest movies or products you might like, to empowering medical diagnostic tools to detect diseases based on patterns in medical imaging data. In each case, the core process remains the same: the ML algorithm learns from data, recognizes patterns, and makes decisions based on those patterns. The beauty of machine learning is in its versatility and adaptability, enabling us to solve complex problems across many different fields. What are the types of machine learning? Machine learning can be divided into three main types: supervised learning, unsupervised learning, and reinforcement learning. Supervised learning In supervised learning, our algorithm is like a student with a very dedicated teacher. We provide the algorithm with both the input data and the correct output. The goal is to learn a general rule that maps inputs to outputs. The teacher here makes sure the student learns exactly what they need to. Examples of supervised learning: Email spam filters are a great example of supervised learning. When an email service is learning to filter spam, it starts with a dataset where each email is labeled as either “spam” or “not spam.” It looks for patterns and keywords in these emails that determine their classification. Once it has learned these patterns, it can then classify new, unlabeled emails as either “spam” or “not spam” based on the rules it has learned. Unsupervised learning Unsupervised learning, on the other hand, is like letting our student explore a library without any guidance. We give the algorithm input data but no explicit output. It’s up to the algorithm to find structure in the data, like grouping or clustering of data points. Example of unsupervised learning A common example of unsupervised learning is customer segmentation in marketing. Let’s say an e-commerce store wants to divide its customers into distinct groups to target them more effectively. They could feed their customer data into an unsupervised learning algorithm, which would identify patterns and trends in the data, such as purchase history, browsing behavior, and customer demographics. The algorithm could then segment the customers based on these patterns, helping the store tailor its marketing to each group’s preferences and behaviors. Reinforced learning Reinforcement learning is slightly different than supervised and unsupervised learning. Imagine our algorithm is a player in a game. It makes certain decisions (moves) and gets rewarded or penalized depending on whether the move is right or wrong. This feedback helps the algorithm learn over time and improve its performance in the game. It is worth mentioning that technically there’s a fourth machine learning type called “semi-supervised learning”. This is basically a combination between supervised and unsupervised learning. Example of reinforced learning Reinforcement learning is often used in robotics. For instance, consider a robot learning to navigate a new environment, like a warehouse. It starts with no knowledge of the environment but learns through trial and error. Each time it reaches its destination successfully, it gets a “reward,” and each time it bumps into an obstacle or takes too long, it gets a “punishment.” Over time, the robot learns the most efficient path to its destination and how to avoid obstacles. Machine learning in action: LLMs, chatbots, and more Now that we’ve covered the basics, let’s look at some practical applications of ML. One such example is the use of machine learning in Large Language Models (LLMs) like ChatGPT and Microsoft’s 365 Copilot. These systems learn from a large dataset of internet text, and by learning, they can generate human-like text that’s relevant to the prompts given. They are the perfect example of how supervised learning works, and they provide a clear picture of how machines can be trained to mimic human-like conversation patterns. Chatbots, too, utilize machine learning. They learn from past interactions to provide appropriate responses in future conversations. This application uses a mix of natural language processing and machine learning. Each conversation with a chatbot is an opportunity for it to learn and enhance its future responses. Machine learning also aids in systems like self-driving cars and medical diagnostics. For instance, machine learning algorithms can be trained to recognize traffic signs, pedestrians, and other vehicles for self-driving cars or identify markers of illness in medical images, providing valuable tools for early detection and diagnosis. Is it difficult to learn machine learning? When it comes to the question of difficulty, it’s a bit subjective and depends on a few factors such as your background, your attitude towards learning, and the resources you use to learn. Learning machine learning can indeed seem daunting at first, especially if you don’t have a strong background in mathematics or programming. However, it’s important to remember the insightful words of Malone, “The more layers you have, the more potential you have for doing complex things well”. This essentially means that with each new layer of knowledge you gain, the better you’ll be at grasping complex machine learning concepts. The good news is that machine learning, like any other subject, can be learned step by step. It might take some time and effort, but the journey can be both rewarding and exciting. Yes, machine learning involves understanding certain complex algorithms and mathematical formulas, but it also involves creativity, problem-solving, and a keen curiosity about how machines can learn and evolve. How can you start learning about machine learning? The most critical aspect of learning machine learning is to have a strong foundation in the basics. Start by brushing up on mathematics, particularly statistics, probability, and linear algebra – these subjects form the backbone of many machine learning algorithms. Next, you need to be comfortable with programming. Python is a great language to start with due to its simplicity and the vast number of machine learning libraries available, such as Scikit-learn, TensorFlow, and PyTorch. There’s a plethora of resources available for beginners. Online courses like Coursera’s Machine Learning by Andrew Ng or edX’s Principles of Machine Learning by Microsoft are excellent starting points. Books like “Python Machine Learning” by Sebastian Raschka and “Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow” by Aurélien Géron can also be beneficial. Working on practical projects is a great way to learn and apply machine learning concepts. Kaggle is a platform where you can find datasets to practice your skills and even compete in ML competitions. Remember, learning machine learning is a journey. As Shulman pointed out, one of the hardest problems is figuring out what problems you can solve with machine learning. So don’t rush. Take the time to understand the basics, experiment, and apply what you’ve learned to real-world problems. In time, you’ll find that you’ve not only learned machine learning but are able to use it to drive innovation and solve complex challenges. Lastly, engage with the community. Join machine learning forums, participate in discussions, and don’t be afraid to ask questions. Machine learning is a rapidly evolving field, and being part of the community will keep you at the forefront of the latest developments. Remember, as LaRovere said, “You really have to work in a team.” ML is no different. By working together, we can learn faster and achieve more. Taking the reins of machine learning We’re now at the end of our coffee shop chat, and hopefully, the concept of machine learning seems a little less daunting. It’s clear that machine learning is becoming an increasingly important tool in our technologically driven world, with applications ranging from chatbots and language models to medical diagnostics and self-driving cars. As this technology continues to evolve, who knows where machine learning will take us next? For now, we can continue to marvel at how it’s already transforming our world. AI Talk