1. Home
  2. Explore
  3. Computer Science
  4. Machine Learning Introduction

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Machine Learning Introduction

Machine Learning for Engineering and Science Applications

Machine learning is best understood as a collection of models and algorithms that allow computers to perform tasks that normally require human cognition. These tasks include recognizing speech, identifying spam, interpreting images, recommending products, and making decisions from complex data.

The central idea is not simply that a computer follows instructions. A traditional program is explicitly given rules for every situation the programmer anticipates. A machine-learning system instead uses examples or data to discover patterns that connect inputs to outputs.

Machine learning gives computers the ability to learn from data and perform tasks without being explicitly programmed with every rule.

Machine Learning in Everyday Technology

Many familiar technologies depend on machine-learning algorithms.

Recommendation systems

Online stores such as Amazon observe patterns in purchases and browsing behavior. If a customer buys one book, the system may recommend other books or products that people with similar behavior found interesting.

The important point is that the system does not need a programmer to write a separate rule for every customer. Instead, it learns relationships from large amounts of purchasing data.

Speech recognition

Devices such as Amazon Echo combine speech-recognition technology with searches and other software services. The system receives spoken language as an input and converts it into a form that a computer can process.

Human beings recognize speech quickly and naturally, even though speech varies with accent, speed, pronunciation, background noise, and vocabulary. Reproducing this ability computationally is difficult because the system must learn patterns rather than rely only on a small list of fixed rules.

Spam filtering

Email systems classify messages as spam or legitimate mail. A person can often make this judgment almost instantly, but writing all the necessary rules explicitly is extremely difficult.

For example, a message mentioning money is not always spam, and a message originating from a particular country is not automatically spam. A reliable filter must consider many interacting features, such as wording, formatting, sender behavior, and message structure. The number of possible combinations grows rapidly, making a fixed rule list impractical.

Autonomous vehicles

Self-driving vehicles use machine learning as part of their ability to interpret their surroundings and make driving decisions. Driving requires recognizing objects, understanding motion, responding to changing conditions, and selecting appropriate actions.

These examples share a common feature: they involve complicated patterns for which a complete list of human-written rules would be too large, too fragile, or impossible to construct.

Why Machine Learning Is Useful

Human cognition often appears effortless because the brain handles enormous numbers of subtle variations automatically. A person can recognize a familiar face even when the person changes clothing, facial expression, hairstyle, age, or facial hair.

A programmer, however, cannot easily write a rule for every one of those cases. The same difficulty appears in language understanding, speech recognition, vision, and decision-making.

Machine learning addresses this problem by allowing the system to infer useful patterns from examples. Instead of specifying every rule directly, the developer provides data and chooses a suitable model. The model then represents the relationship between the data and the desired result.

Machine-learning models as engineering models

Engineering already depends on models. Examples include:

  • The ideal-gas law, which models relationships among physical quantities in gases.
  • Ohm’s law, which models the relationship among current, voltage, and resistance.
  • Fluid-mechanics models, which describe fluid behavior.
  • Solid-mechanics models, which describe stress and strain.
  • Turbulence models, which approximate complicated flow behavior.

Machine-learning algorithms can be viewed in the same way. They are models of input-output relationships.

For example:

  • The input may be an email.
  • The output may be a classification: spam or not spam.
  • The input may be an image.
  • The output may be a diagnosis or object label.
  • The input may be a time sequence.
  • The output may be a prediction about a later state.

The main questions are therefore:

  1. What model is appropriate for the problem?
  2. What relationship between input and output should the model represent?
  3. Under what conditions will the model work well?
  4. What data and computation are required?

Think About It

Why is a learned pattern often more useful than a long list of manually written rules when the problem contains many possible variations?

Applications in Engineering and Science

Machine learning is especially valuable when an existing scientific or engineering process is accurate but computationally expensive, or when expert judgment is difficult to encode directly.

Medical-image diagnosis

Radiologists examine X-rays and magnetic-resonance images to identify abnormalities and make diagnoses. A machine-learning model can be trained to analyze medical images and assist with judgments such as whether a tumor appears cancerous or noncancerous.

The goal is not merely to process pixels. The model must identify visual patterns associated with medically meaningful categories. This is an example of replacing or supporting a complicated expert-recognition task with a learned model.

Computational fluid dynamics

When fluid flows past a cylinder, the flow field can be represented through quantities such as velocity contours. Traditionally, this type of problem is studied using computational fluid dynamics, or CFD.

CFD commonly relies on mathematical models, including continuum-based and partial-differential-equation-based descriptions of physical behavior. These methods can provide detailed results, but they may require substantial computation.

Machine learning can sometimes build a faster approximation of part of the CFD process. Such a model may learn how flow conditions relate to the resulting velocity field. The objective is not necessarily to replace all physical modeling, but to determine whether selected calculations can be performed more rapidly.

Similar ideas can apply to solid-mechanics modeling and other simulation-based engineering problems.

Main Goals of the Course

The course emphasizes both understanding and application.

Its central goals are to:

  • Understand basic machine-learning models thoroughly.
  • Study deep learning and artificial neural networks.
  • Learn classical techniques that have been used for many decades.
  • Examine modern methods that developed more recently.
  • Connect machine-learning methods to engineering and scientific applications.
  • Develop enough programming ability to perform hands-on experiments.
  • Learn to read and understand applied machine-learning research papers.

The field changes quickly. Important developments are often reported first in research papers rather than in textbooks. Therefore, understanding applied research literature is an important practical skill.

A learner may not immediately understand every highly theoretical result in machine learning. However, the course aims to provide enough background to interpret papers that apply machine learning to practical problems such as medical-image analysis, turbulence modeling, and CFD.

Mathematical and Programming Preparation

Mathematical sophistication

The required mathematical preparation is not the memorization of every topic in advanced mathematics. It is more important to be comfortable thinking quantitatively.

A learner should be able to interpret a problem using mathematical relationships rather than only qualitative descriptions. The course introduces the essential ideas from several mathematical areas, including:

  • Linear algebra.
  • Probability.
  • Statistics.
  • Numerical computation.
  • Optimization.

Probability deserves particular attention because machine-learning models often represent uncertainty, likelihood, and variation mathematically.

Programming preparation

The course uses examples in Python and MATLAB. Basic familiarity with programming syntax is expected, but the greatest benefit comes from writing and running programs independently.

Machine learning is difficult to understand fully through passive reading alone. Coding allows a learner to observe how changing data, model structure, or parameters affects the result. Suggested exercises provide opportunities to practice these ideas.

Course Organization and Major Families of Models

The material is organized into several broad groups.

Artificial neural networks and deep learning

The first major group includes:

  • Simple artificial neural networks.
  • Multilayer neural networks.
  • Convolutional neural networks.
  • Recurrent neural networks.
  • Deep-learning methods.

A neural network can be viewed as a flexible mathematical function that transforms inputs into outputs. Its internal parameters are adjusted during training so that its predictions become more accurate.

Deep learning generally refers to neural networks with multiple layers of learned transformations. Different layers can represent different levels of structure, allowing the model to learn increasingly complex patterns.

Linear and logistic regression

Linear regression is a simple model for representing relationships between input variables and a numerical output. It can also be interpreted as a very simplified neural network.

Logistic regression is used for classification problems, such as deciding whether an email is spam or whether an image belongs to one of two categories. These models provide foundational examples of how a model maps input data to predictions.

Convolutional neural networks

Convolutional neural networks, or CNNs, are particularly useful for vision-based problems. Images contain local spatial patterns, such as edges, shapes, and textures. CNNs use specialized operations that help detect and combine these local patterns.

As the network becomes deeper, it can represent increasingly complex visual structures. This makes CNNs useful for tasks such as image recognition and medical-image analysis.

Recurrent neural networks

Recurrent neural networks, or RNNs, are designed for sequential data. In a sequence, the order of the observations matters.

Examples include:

  • Time-series data.
  • Speech.
  • Text.
  • Measurements that evolve over time.

An RNN uses information from earlier portions of a sequence when processing later portions. This makes it suitable for problems in which the current output depends partly on previous events.

Classical machine-learning techniques

Classical techniques remain important because not every problem requires a deep neural network. The course examines methods such as:

  • Tree-based models.
  • Support-vector machines.
  • Probabilistic methods.
  • Gaussian mixture models.
  • Unsupervised-learning techniques.

These methods may be effective when the dataset is smaller, the structure of the problem is different, or interpretability and computational efficiency are important.

Advanced techniques

The course also considers more modern methods, including generative adversarial networks and possibly reinforcement learning if time allows.

Generative adversarial networks involve competing learning processes and are used to model or generate data. Reinforcement learning concerns systems that learn actions through interaction with an environment and feedback about those actions.

A Progression Through the Material

The early portion of the course establishes the mathematical and computational foundations:

  1. Linear algebra.
  2. Probability and statistics.
  3. Numerical computation and optimization.
  4. An overview of available machine-learning software packages.

The next stage introduces neural networks through simpler models such as linear regression and logistic regression. These provide a bridge to multilayer and deep neural networks.

The following stage focuses on specialized neural-network architectures. CNNs are applied to visual data, while RNNs are applied to sequential and time-dependent data.

The course then turns to classical machine-learning methods, probabilistic models, and unsupervised learning before reaching advanced techniques.

Applications are integrated throughout the material rather than treated as a separate subject. Each model is connected to engineering or scientific problems where the model may be useful.

Think About It

Why might a classical model still be useful even after deep learning has become highly successful?

A Brief History of Artificial Intelligence

The history of artificial intelligence shows that ideas rise and fall in popularity. Some methods become temporarily unpopular because of limitations in computation, data, theory, or expectations, only to become useful again when conditions change.

Understanding this history helps explain both the progress of the field and the repeated cycles of excitement and disappointment.

Early ideas about artificial intelligence

Human beings have long created tools to extend physical abilities. Wheels assist transportation, levers assist lifting, and mechanical tools reproduce or amplify hand movements.

The same general curiosity applies to thinking. People have also wondered whether tools could reproduce aspects of human reasoning, speech, motion, or creativity.

Historical examples include speculation about machines that could imitate human speech and movement, as well as mechanical automatons that performed actions automatically. Some claimed machines were more capable than they really were.

The Mechanical Turk, for example, was presented as a machine that could play chess. In reality, a person hidden inside operated it. Although the claim was fraudulent, it illustrates the long-standing fascination with artificial reasoning and mechanical intelligence.

Leibniz and elemental ideas

Leibniz proposed that human thoughts might be combinations of simpler, basic units of thought. This idea resembles the way modern computers operate: complex operations can be constructed from simpler elements, ultimately represented electronically through binary states.

The broader question is whether thinking, reasoning, and creativity can be decomposed into elemental processes that a machine can reproduce. This remains a deep question, but it is closely related to the goals of artificial intelligence.

Babbage and the analytical engine

Charles Babbage conceptualized the analytical engine in the nineteenth century. Although the machine was not completed as a modern computer, its design anticipated important features of general-purpose computation.

The first practical electronic computers appeared in the 1940s. The fundamental insight was that one general-purpose machine could perform many different tasks through different instructions.

Modern computers can book tickets, record speech, play music, and display films. In this broad sense, a computer can perform many activities that once required separate machines. However, ordinary computation does not necessarily mean learning. Machine learning extends computation by attempting to create algorithms that improve through experience or data.

The Foundations of Modern Artificial Intelligence

Early machines

A chess-playing machine from 1914 demonstrated a limited king-and-rook-versus-king ending. This was a narrow task, but it showed that a machine could carry out a specialized strategy.

A radio-controlled driverless car was demonstrated in 1925. It was not autonomous in the modern sense because it depended on external radio control, but it showed that vehicle movement could be mechanized.

The 1940s

The 1940s brought important theoretical progress:

  • Early artificial-neuron models were proposed.
  • Alan Turing developed foundational ideas about computation.
  • The concept of a universal computer was established.
  • Claude Shannon developed information theory.

A universal computer is a machine capable of performing any computable task when supplied with the appropriate instructions. This idea explains how one computer can perform many apparently different activities.

Information theory provides mathematical tools for reasoning about information, uncertainty, and communication. These ideas later became important in machine learning, statistics, and signal processing.

The 1950s

Artificial intelligence became a distinct and highly optimistic field during the 1950s.

Important developments included:

  • Norbert Wiener’s work on cybernetics.
  • Early neural-network machines.
  • Automated theorem-proving systems.
  • The development of ideas related to decision theory.
  • The 1956 Dartmouth conference, where the term artificial intelligence was coined.
  • Frank Rosenblatt’s two-layer neural network, called the perceptron.

A perceptron is a simple artificial neural network that combines inputs to make a decision. It became an important early model for machine learning.

Arthur Samuel described machine learning more precisely as giving computers the ability to learn without being explicitly programmed. This definition emphasizes the distinction between writing every rule by hand and allowing the system to infer behavior from data.

Rule-Based Systems Versus Machine Learning

Expert systems

A rule-based or expert system encodes human knowledge as explicit instructions. For grammar correction, a programmer might write rules describing how words should change depending on whether a subject is singular or plural.

This approach works well when the rules are clear, limited, and stable. It becomes difficult when the domain contains exceptions, ambiguity, or a very large number of interacting cases.

Language demonstrates this challenge. A person may switch smoothly among multiple languages, but it is not obvious how to write a complete set of rules that explains every grammatical decision. The same problem appears in chess, natural-language understanding, image recognition, and common-sense reasoning.

The difficulty of common sense

Common sense is easy for humans to use but extremely difficult to encode explicitly. A young child can recognize a parent despite changes in clothing, expression, hairstyle, age, or facial hair. A rule-based program would need to account for all of these variations and many others.

This is one reason machine learning is valuable: it can learn general patterns from many examples instead of requiring a separate rule for every possible situation.

Why early AI struggled

Early artificial-intelligence systems made progress on small, carefully defined problems. They could handle simple games, algebraic exercises, chemistry models, and limited language tasks.

However, these systems often failed when the problem became larger or less structured because:

  • They depended heavily on manually specified rules.
  • They could not respond well to situations not covered by those rules.
  • The number of possible cases grew very rapidly.
  • Available computers had limited computational power.

Combinatorial explosion

Combinatorial explosion occurs when the number of possible configurations or choices increases extremely rapidly as a problem becomes larger.

A chess position with only a few pieces has relatively few possibilities. Adding more pieces creates many more possible moves and future positions. The growth may follow very steep patterns, such as factorial or power-law growth, making exhaustive rule-based analysis expensive or impossible.

This problem is not limited to chess. It also affects grammar, planning, language, vision, and other tasks in which many elements interact.

The First AI Winter

During the first AI winter, roughly from 1974 to 1980, enthusiasm and funding declined.

Several factors contributed:

  • Early results were often limited to simple toy problems.
  • Computational resources were weak compared with modern computers.
  • Rule-based systems suffered from combinatorial explosion.
  • The limitations of simple neural networks became more widely recognized.
  • It was difficult to train multilayer neural networks automatically.

A single-layer perceptron could not solve certain classes of problems. In addition, the training of multilayer networks was considered difficult. These technical limitations, combined with exaggerated expectations, led to reduced government funding and a slowdown in research.

The history illustrates an important lesson: a promising idea may still fail to produce practical results if the available data, algorithms, or computation are inadequate.

Later Cycles of Progress and Setback

The 1980s

Artificial intelligence experienced renewed interest during the 1980s.

Developments included:

  • Further work on expert systems.
  • Greater attention to neural networks.
  • Wider use of the backpropagation algorithm.
  • Progress toward autonomous vehicles.
  • Significant investment in driverless-car research.

Backpropagation is a method for adjusting the parameters of a neural network by measuring how much each parameter contributes to prediction error. It became central to training multilayer networks.

Despite renewed optimism, many ambitious goals were not achieved. This contributed to another period of reduced funding and interest from approximately 1987 to 1993.

The 1990s

The personal-computer revolution shifted attention toward practical, individual computing rather than highly ambitious goals such as creating generally intelligent machines.

In 1997, IBM’s Deep Blue defeated chess champion Garry Kasparov. Deep Blue was primarily a rule-based system rather than a modern machine-learning system. Its success demonstrated that a computer could outperform a human in a complex game under particular conditions, but it did not establish that the system could learn generally.

During this period, theoretical work in probability, information theory, optimization, and algorithms also advanced. These developments later became important foundations for modern machine learning.

Moore’s law and computational growth

Moore’s law describes the historical trend that the number of transistors in integrated circuits approximately doubled every two years. The broader practical effect was a major increase in computational power.

The amount of computation available for a given cost grew very rapidly, approximately exponentially over long periods. This made it possible to train larger models on more demanding problems.

Graphics processing units, or GPUs, further increased affordable computational capacity. GPUs are well suited to performing many similar numerical operations in parallel, which is useful for training neural networks.

The Data-Driven Expansion of Machine Learning

From approximately 2000 to 2012, major progress occurred even though artificial intelligence did not always receive the same public attention as during earlier hype cycles.

The growth of data

The expansion of the internet generated enormous quantities of data, including:

  • Search queries.
  • Images.
  • Videos.
  • Text.
  • User interactions.
  • Product information.

Machine learning is highly data-dependent. More data can provide more examples from which a model can identify regularities, although the data must still be useful and properly handled.

More focused objectives

Researchers increasingly moved away from vague goals such as creating a machine that understands everything. Instead, they targeted specific tasks:

  • Recognizing digits in postal codes.
  • Filtering spam.
  • Classifying images.
  • Understanding particular kinds of language.
  • Driving under specified conditions.

A narrowly defined task is easier to measure, train, and improve. This practical focus contributed greatly to reliable progress.

Distributed and voluntary data creation

Games, image tagging, and CAPTCHA systems also generated useful data. A CAPTCHA asks a person to identify characters or images to distinguish humans from automated systems. Those responses can also provide examples that help improve machine recognition.

Thus, people often contributed training information directly or indirectly through ordinary online activities.

The Modern Deep-Learning Boom

ImageNet and AlexNet

A major turning point occurred in the 2012 ImageNet image-recognition challenge. The task involved classifying images into one of many categories, such as animals, buildings, or other objects.

Before 2012, leading systems relied largely on traditional computer-vision techniques. In 2012, a convolutional neural network called AlexNet achieved a large improvement over previous methods.

Since then, machine-learning methods have dominated the competition. The result drew widespread attention because it demonstrated that deep neural networks could achieve a dramatic improvement in visual recognition when combined with sufficient data and computation.

Watson and language-based tasks

IBM’s Watson defeated a champion in the quiz show Jeopardy!. The challenge involved not only factual knowledge but also language complexity, wordplay, puns, and indirect references.

This achievement demonstrated progress in combining information retrieval, language processing, and decision-making. It also showed that machine performance can be strong when a system is designed for a specific, measurable task.

AlphaGo and the game of Go

Go is played on a 19×1919 \times 1919×19 board using black and white stones. Its rules are relatively simple, but the number of possible positions is extremely large. This makes it more difficult for exhaustive rule-based search than chess.

AlphaGo defeated the Go champion Lee Sedol, surprising many observers. The result was important because Go had long been regarded as a major challenge for artificial intelligence.

The success showed that machine-learning systems could learn strategies in domains where explicitly listing the best action for every situation would be impractical.

Why this period was different

The modern boom was supported by several factors:

  • Much greater computational power.
  • Affordable GPUs.
  • Vast quantities of digital data.
  • Improved algorithms.
  • Better software frameworks.
  • Open-source tools.
  • Increased private and government investment.
  • Wider access to computational resources.

These changes allowed many researchers and organizations to experiment with models that previously would have been too expensive or difficult to train.

Democratization of resources

Machine learning became more accessible because powerful tools and software were made widely available. A modern personal computer with a suitable GPU can run many useful algorithms, while open-source frameworks allow researchers to build on existing implementations.

This changes the nature of learning machine learning. A person does not always need to implement every algorithm from the beginning. However, understanding the model remains essential because software packages do not automatically reveal when a method is appropriate or why it succeeds or fails.

Think About It

Why did the combination of data, computing power, and improved algorithms produce more progress than any one of these factors would have produced alone?

The Importance of Research Papers

Machine learning is developing rapidly. Some important methods may be only a few years old, and textbooks cannot always keep pace with current research.

For this reason, an important outcome of the course is the ability to:

  • Identify the problem a paper addresses.
  • Understand the model being used.
  • Interpret the input and output.
  • Follow the evaluation procedure.
  • Determine the circumstances under which the method works.
  • Relate the method to an engineering or scientific application.

Reading applied research is particularly important because engineering practice often depends on adapting a method to a specific domain. Understanding the underlying model helps determine whether a published approach can be transferred to another problem.

Applications as the Main Context

The emphasis of the course is application-oriented rather than purely theoretical. Machine learning overlaps with electrical engineering, computer science, mathematics, and many other fields, but the focus is on how models can be used in engineering and science.

Examples include:

  • Medical-image diagnosis.
  • Turbulence modeling.
  • CFD acceleration.
  • Vision-based recognition.
  • Time-series analysis.
  • Sequence prediction.
  • Classification of scientific measurements.

The central concern is not simply whether an algorithm is mathematically elegant. It is whether the algorithm represents the relevant input-output relationship and performs reliably under the conditions of the application.

Comprehensive Review

Machine learning provides algorithms that learn useful input-output relationships from data rather than relying entirely on manually written rules. It is valuable when human judgment is difficult to encode, when the number of possible cases is enormous, or when a traditional simulation is computationally expensive.

The field includes simple models such as linear and logistic regression, classical methods such as tree-based models and support-vector machines, probabilistic and unsupervised methods, and neural architectures such as CNNs and RNNs. Deep learning uses multilayer neural networks to learn increasingly complex representations.

The history of artificial intelligence shows repeated cycles of enthusiasm, limitation, and renewed progress. Early systems were restricted by weak computers, limited data, rigid rules, and combinatorial explosion. Later advances in computation, GPUs, data availability, algorithms, and open-source software enabled the modern deep-learning boom.

For engineering and science, machine learning should be treated as a modeling tool. The key questions are which model fits a problem, what data it needs, how it should be trained, and under what circumstances its predictions can be trusted. Understanding these relationships allows machine learning to support areas ranging from medical diagnosis to fluid-flow simulation.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent