Basics of Machine Learning

Machine Learning is one of the most exciting and rapidly evolving fields in modern engineering. It allows computers to learn from data, recognize patterns, and make intelligent decisions—without being explicitly programmed for every scenario. Unlike traditional programming where we define strict rules, machine learning focuses on building systems that can adapt and improve through experience. This ability to "learn" makes it a key technology behind innovations like self-driving cars, facial recognition, speech assistants, and even advanced medical diagnosis systems.

For engineering students, learning machine learning opens the door to solving real-world problems across diverse domains such as automation, smart manufacturing, predictive maintenance, and robotics. It brings together concepts from mathematics, statistics, computer science, and domain knowledge to design models that can analyze data and make accurate predictions. As the digital world generates massive amounts of data every second, mastering machine learning equips future engineers with the tools to build intelligent, data-driven solutions that shape the future of technology.

What Is Machine Learning?

Machine Learning is the science (and art) of programming computers so they can learn from data.

Here is a slightly more general definition:

[Machine Learning is the] field of study that gives computers the ability to learn without being explicitly programmed.

—Arthur Samuel, 1959

And a more engineering-oriented one:

A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P,improves with experience E.

—Tom Mitchell, 1997

Your spam filter is a Machine Learning program that, given examples of spam emails (e.g., flagged by users) and examples of regular (nonspam, also called “ham”) emails, can learn to flag spam. The examples that the system uses to learn are called the training set. Each training example is called a training instance (or sample). In this case, the task T is to flag spam for new emails, the experience E is the training data, and the performance measure P needs to be defined; for example, you can use the ratio of correctly classified emails. This particular performance measure is called accuracy, and it is often used in classification tasks.

Why Use Machine Learning?
Consider how you would write a spam filter using traditional programming techniques (Figure 1-1):

1. First you would consider what spam typically looks like. You might notice that some words or phrases (such as “4U,” “credit card,” “free,” and “amazing”) tend to come up a lot in the subject line. Perhaps you would also notice a few other patterns in the sender’s name, the email’s body, and other parts of the email.

2. You would write a detection algorithm for each of the patterns that you noticed, and your program would flag emails as spam if a number of these patterns were detected.
3. You would test your program and repeat steps 1 and 2 until it was good enough to launch.


Since the problem is difficult, your program will likely become a long list of complex rules—pretty hard to maintain.

In contrast, a spam filter based on Machine Learning techniques automatically learns which words and phrases are good predictors of spam by detecting unusually frequent patterns of words in the spam examples compared to the ham examples (Figure 1-2). The program is much shorter, easier to maintain, and most likely more accurate.

What if spammers notice that all their emails containing “4U” are blocked? They might start writing “For U” instead. A spam filter using traditional programming techniques would need to be updated to flag “For U” emails. If spammers keep working around your spam filter, you will need to keep writing new rules forever. In contrast, a spam filter based on Machine Learning techniques automatically notices that “For U” has become unusually frequent in spam flagged by users, and it starts flagging them without your intervention (Figure 1-3).

Finally, Machine Learning can help humans learn (Figure 1-4). ML algorithms can be inspected to see what they have learned (although for some algorithms this can be tricky). For instance, once a spam filter has been trained on enough spam, it can easily be inspected to reveal the list of words and combinations of words that it believes are the best predictors of spam. Sometimes this will reveal unsuspected correlations or new trends, and thereby lead to a better understanding of the problem.Applying ML techniques to dig into large amounts of data can help discover patterns that were not immediately apparent. This is called data mining.
To summarize, Machine Learning is great for:

• Problems for which existing solutions require a lot of fine-tuning or long lists of rules: one Machine Learning algorithm can often simplify code and perform better than the traditional approach.
• Complex problems for which using a traditional approach yields no good solution: the best Machine Learning techniques can perhaps find a solution.
• Fluctuating environments: a Machine Learning system can adapt to new data.
• Getting insights about complex problems and large amounts of data.

Examples of Applications
Let’s look at some concrete examples of Machine Learning tasks, along with the techniques that can tackle them:

Analyzing images of products on a production line to automatically classify them.This is image classification, typically performed using convolutional neural networks(CNN).

Detecting tumors in brain scans
This is semantic segmentation, where each pixel in the image is classified (as we want to determine the exact location and shape of tumors), typically using CNNs as well.

Automatically classifying news articles
This is natural language processing (NLP), and more specifically text classification, which can be tackled using recurrent neural networks (RNNs), CNNs, or Transformers.

Automatically flagging offensive comments on discussion forums
This is also text classification, using the same NLP tools.

Summarizing long documents automatically
This is a branch of NLP called text summarization, again using the same tools.

Creating a chatbot or a personal assistant
This involves many NLP components, including natural language understanding (NLU) and question-answering modules.

Forecasting your company’s revenue next year, based on many performance metrics This is a regression task (i.e., predicting values) that may be tackled using any regression model, such as a Linear Regression or Polynomial Regression model.

Making your app react to voice commands
This is speech recognition, which requires processing audio samples: since they are long and complex sequences, they are typically processed using RNNs, CNNs,or Transformers.

Detecting credit card fraud
This is anomaly detection.

Segmenting clients based on their purchases so that you can design a different marketing strategy for each segment.This is clustering.

Data Visualization
Representing a complex, high-dimensional dataset in a clear and insightful diagram.This is data visualization, often involving dimensionality reduction techniques.

Recommender System
Recommending a product that a client may be interested in, based on past purchases This is a recommender system. One approach is to feed past purchases (and other information about the client) to an artificial neural network and get it to output the most likely next purchase. This neural net would typically be trained on past sequences of purchases across all clients.

Building an intelligent bot for a game
This is often tackled using Reinforcement Learning (RL), which is a branch of Machine Learning that trains agents (such as bots) to pick the actions that will maximize their rewards over time (e.g., a bot may get a reward every time the player loses some life points), within a given environment (such as the game). The famous AlphaGo program that beat the world champion at the game of Go was built using RL.
This list could go on and on, but hopefully it gives you a sense of the incredible breadth and complexity of the tasks that Machine Learning can tackle, and the types of techniques that you would use for each task.

Comments

Popular posts from this blog

GNEST305 Introduction to Artificial Intelligence and Data Science KTU BTech S3 2024 Scheme - Dr Binu V P

Types of Machine Learning Systems