Introduction to Machine Learning

19. Introduction to Machine Learning#

Kriti Sehgal

You may have heard the terms “machine learning” and “artificial intelligence” before. In this chapter, we will define what these terms mean and clarify how they differ from one another and from the broader field of “data science.”

Artificial intelligence is a broad term that refers to computers or machines behaving intelligently, in other words performing tasks that typically require human intelligence such as reasoning, problem-solving, understanding language, or making decisions. Some of the techniques used in artificial intelligence include logic, rule-based systems, search algorithms, and machine learning. Yes, machine learning is actually a set of techniques within artificial intelligence!

To understand what machine learning is, think about how we humans make decisions based on our experiences. For example, how did you learn what an apple looks like? Most of the time, we didn’t learn by someone explaining strict rules for identifying apples. Instead, we learned by repetition. When we were kids, adults would tell us the names of objects. Over time, after seeing many apples and hearing the word “apple” repeatedly, we naturally learned what an apple is. Machine learning works in a similar way. In the language of machines, “experiences” mean data. We show a computer many images and tell it which ones contain apples until the computer recognizes the patterns and features that define an apple.

To clarify, artificial intelligence may or may not use data to make decisions. Machine learning, however, is a branch of artificial intelligence focused on developing algorithms that learn patterns from data and improve with experience instead of being explicitly programmed. We still program the computer to recognize patterns and learn from data, but we do not explicitly program it to respond to every possible situation. Instead, the computer uses data to build a model. A model is a set of rules that represents the data and can be used to make predictions. In DATA 119 or part-II of this textbook, we will learn these techniques and methods that enable computers to learn patterns.

Let us consider the example of spam email detection. A human programmer might write if-then rules such as: if the email contains phrases like “free money” or “lucky winner,” or contains more than three links, mark it as spam. This kind of spam detection program falls under artificial intelligence because it performs the intelligent task of classifying emails as spam or not spam. However, if instead of writing explicit rules, we provide the machine with a dataset of emails already labeled as spam or not spam, and then ask it to classify a new email, this process falls under machine learning. Here, the intelligent task is performed based on what the machine learns from the data.

So, where does data science fit into this picture? Recall that data science is the interdisciplinary field focused on extracting insights from data. We use techniques from statistics, mathematics, computer science, and domain knowledge to uncover these insights. Data is always involved in data science, but it may or may not rely on machine learning algorithms. Data science overlaps with both machine learning and artificial intelligence but also includes non-AI approaches, such as pure statistics.

../../_images/venn_diagram_AI_ML_DS.png

Figure: Venn Diagram showing the relationship between AI, ML, and Data Science.

In short:

  • Artificial Intelligence means making machines “intelligent” by enabling them to perform tasks that usually require human decision-making.

  • Machine Learning shares this goal but focuses on techniques that teach machines to learn from data.

  • Data Science involves extracting insights from data and may or may not use machine learning or AI.

References:

[1] Serrano, Luis. Grokking machine learning. Simon and Schuster, 2021, link