Supervised learning
Features, responses, and training set
Machine learning works with so-called objects. In the spam classification task, the objects are emails, and in the travel time prediction task, the objects are the starting and ending points of the route and environmental information that influences the travel time.
Each object is described by a pair(x,y), Where
- x– input information that we know about the object;
- y– the output information that we want to predict for the object x.
In this case, for ease of processing, the input information is in most cases encoded by some vector of fixed length x∈RD, where each element of this vector is called a feature, and the entire vectorx– a feature vector. The feature number will henceforth be denoted by a superscript:x=[x1,x2,...xD].
Output information y is called the response or target variable.
In the most typical situation, we know a labeled sample of N objects:
(x1,y1),(x2,y2),...(xN,yN)
This problem is called a supervised learning problem because the model can use the correct “teacher” labeling for a set of N objects for customizing their parameters. Teacher-based tagging is obtained either through manual tagging by subject matter experts or by logging input and output data (which we want to predict based on future inputs) in advance. For example, we can log which emails a user has voluntarily marked as spam, so that we can predict their preferences in the future.
Types of supervised learning problems
Depending on the type of response, supervised learning problems are divided into the following categories:
- Regression: The response is a number y∈R. You will become familiar with various regression models of this type in later articles of the tutorial.
- Examples: predicting travel time along a route; the focal length of a camera to sharpen faces; or the price of a stock the next day.
- Vector regression: the response is immediately a vector of real answers y∈RM. The vector regression problem can be solved using individual regression algorithms. But it’s more effective to build a forecast for all M predictions immediately, which can be achieved, for example, with the help of neural networks, which are the subject of the second part of the tutorial – ” deep learning “.
- Examples: we forecast the future price of not just one stock, but several at once; when forecasting the weather, we simultaneously predict temperature, humidity, pressure, and wind speed.
- Ranking: the response takes on real relevance valuesy∈R; however, in actual use, it is not the absolute response values that are important, but the relative ones, because the final result is an ordering of objects by degree of relevance.
- Examples: in an information search, rank relevant documents or products in a store based on a user’s search query.
- Classification: the response takes one of C discrete values, y ∈ {1, 2,…, C}. A special case of classification is binary classification, when there are only two classes. In this case, one of them is called positive, and the other is negative, andy∈{+1,- 1}. Classifiers are described in general terms in a separate article of the tutorial. In subsequent chapters, you will also become familiar with the main classification models.
- Examples of binary classification include determining whether a person is sick or healthy based on test results; determining whether an email is spam or a useful message; predicting whether a client with certain characteristics will repay a loan to a bank.
- Examples of multi-class classification: identifying a person from a photo, diagnosing a disease based on symptoms; classifying news by topic (sports/politics/economics/technology/culture).
- Labeling: Similar to classification, but an object can belong to several classes or none.
- Examples: automatic hashtags for images; assignment of text to thematic categories that may be present in it simultaneously.
Other types of responses.
The most typical response types are described above, but in general, a response can be an object of any type. Specifically, machine learning models can be trained to generate:
- texts (when translating from one language to another, when answering questions),
- graphs (when selecting chemical compounds with the required chemical properties),
- sound (when voicing the text),
- images (in tasks of redrawing user photographs in the style of famous artists or based on a text request).
Complex structured responses are implemented by neural networks, which we will study in the tutorial on deep learning.
An example of a regression problem
Below is an example of a regression problem in which a real response on the Y axis must be predicted based on a one-dimensional feature on the X axis. The training sample is indicated by orange dots, for which the dependence must be reconstructed: y^ = f (x) to be able to predict the target value y for any new object x. As we can see, this can be done in various ways with varying forecast errors.

Example of a classification problem
Below is an example of a classification problem in which each object is described by two featuresx1Andx2, denoted by the X and Y axes. Each object in the training set is represented by a point on the graph. The target value for prediction is one of three classes, each of which is shown in a different color. Using these points, it is necessary to reconstruct the general pattern of correlation between any point (x1,x2) and one of the classes.

Special formulations of the supervised learning problem
If, in addition to the training objects, the feature descriptions are known in advance or test objects for which a future prediction must be made, this task is called transductive learning. Additional knowledge about the test objects allows for a more precise model tuning specifically for these objects.
There are situations when not only the target variables are known for the training sample objects, but also explanations (privileged information) of why the response is exactly as it is. Consider, for example, a medical classification task in which a diagnosis must be made for patients with given characteristics (such as gender, age, history of doctor visits, general condition, current complaints). In this task, the labeling (the doctor’s final diagnosis) may contain additional explanations.z, characterizing the doctor’s comments and why they made a particular diagnosis. In this case, the training set consists of triplets (input features, response, explanation):
(x1,y1,z1),(x2,y2,z2),...(xN,yN,zN)
It is necessary to build a model that, as before, will predict the response based on the input featuresy^=f(x) already for new objects, but for more precise tuning, the model can also use explanations z, available in the training set. Model tuning in this case is called learning using privileged information.
Explore More IT Terms
#
- Using an integrating factor
- Equations in total differentials
- Bernoulli's equation
- Linear differential equations of the first order
- 10 Mixed C++ Challenges to Test Your Skills
- 11 Tricky Non-Technical Questions to Ask in a Recruiting Interview
- 50 Terms Every Programmer Should Know
- 52 Java Thread Interview Questions
- 7 Levels of Using the Zip Function in Python
- 7 Python Code Bugs You Need to Fix
- 70+ Free Resources for Learning Programming
A
- A Comprehensive Guide to HTML and CSS
- A Comprehensive Guide to MODX CMS
- A computer science question tests your ability to work with IP addresses and network masks
- A Guide to SQL Query Formatting for Beginners
- A/B testing
- Abstract Data Type (ADT)
- AES Encryption Algorithm: How It Works and Where It's Used
- Agile
- Algorithm
- Algorithm Analysis
- Algorithm Complexity-Key Points
- Algorithm complexity: deep parsing O(log n)
- Algorithm vs. Program
- Algorithms and Data Structures in C#
- An overview of the C # programming language
- An overview of the Python programming language
- Anaconda Python
- Analysis of graphs and adjacency matrices question
- Android
- Android App Bundle
- Android SDK
- Angular
- Ansible
- Apache
- Apache Airflow
- Apache Kafka
- Apache Tomcat
- App Store
- AppCode
- Applications of microcontrollers: From simple circuits in electronics to complex systems
- Applications of the derivative
- Arduino: How to Program It: Basics for Beginners
- Array-based stack
- ArrayList
- ASCII
- ASP.NET
- Assembly Language Lessons
B
C
- C++ Lessons
- Cache
- Calculating Memory Capacity
- Character sets and encodings
- Characteristics of a good Algorithm
- Circular singly linked list
- Coding Tests with Answers
- Combinational Circuits Solved Questions
- Compiler
- Complexity of algorithms-Tutorial
- Computer Science Fundamentals Test with Answers (47 questions)
- Computer science tests with answers (More than 100 Questions)
- Constants
- Creating a Table in HTML
- Creating Forms in HTML
- Creating Lists
- Cybernetics and informatics
- Cycles
D
- Data Analytics: applications of data analysis in companies
- Data Engineer - Who is it, what does a data engineer do, and an overview of the profession
- Data modeling: what it is, types, and process steps.
- Data preprocessing: a complete guide for beginners and professionals.
- Data structure
- Data Structures and Algorithms (DSA)
- Data types vs. Data structures
- Database Tests with Answers
- Deep Learning
- Defining Aliases
- Defining Arrays
- Deque
- Detailed articles and tutorials on PHP
- Developing a Website from Scratch
- Differential Equations
- Differentiation of functions
- Digital data: understand the importance of this asset for businesses.
- Double integrals
- Doubly linked lists
- DSA Tutorial
E
F
G
H
- Handling errors and exceptions
- Heads or Tails? How Probability Theory Is Used in IT
- History of the development of computer science
- Homogeneous equations
- Homogeneous vs. non-homogeneous structures
- How to convert numbers between binary, octal, and hexadecimal number systems
- How to effectively organize your workflow
- How to Learn Java: Tips for Beginner Developers
- How to Learn PHP: A Beginner's Guide
- How to Use S3 Storage in Kubernetes with CSI
- HTML
- HTML and CSS: Definition, Application, and Operating Principles
- HTML and CSS. Layout from Scratch: What to Learn, Where to Learn, and How Long Will It Take?
- HTML Frame Structure
- HTML Link Formatting
- HTML Quizzes with Answers
I
- if..else construction
- Infinite sequences and series
- Information properties
- Inheritance in Java: A Complete Guide to Principles and Implementation
- Inserting an Image
- Integration of functions
- Interactive Python Tutorial – Learn Programming from Scratch
- Interpreter
- Interview Problem: Finding a Deleted Element in O(N)
- Interview Scare: The FizzBuzz Challenge
- Introduction to C++
- Introduction to Machine Learning
- Introduction to Machine Learning with Python
- Introduction to Networking | Network Fundamentals Part 1
- Introduction to Number Systems (Binary, Octal, Hexadecimal) | Math for CS Foundations #1
- IT Specialist Resume (CV)
J
K
L
M
- Machine Learning
- Machine Learning Basic Tool: NumPy
- Machine Learning Basic Tool: Pandas
- Machine Learning Basics
- Machine Learning Mathematics
- Machine Learning with Python
- Mathematics for programmers: what is really needed?
- MD5 encryption algorithm: What is it and why is it needed?
- Microcontroller and Microprocessor - what's the difference?
- ML Engineer: Who They Are, What They Do, How Much They Earn, and How to Become a Neural Network Specialist
- Monte Carlo Simulation: How It Works and What It's For
O
P
- PHP lessons
- Private DNS server and its configuration
- Program code
- Programmer's Dictionary
- Programming
- Programming with pseudocode
- Python Code Formatting Guide: PEP8
- Python for data analysis: how to do it and main libraries
- Python Lessons
- Python Superstar: 5 Ways to Use the * Operator
- Python vs. Julia: Should You Replace Python with Julia?
Q
R
S
- Setting up model parameters
- SFML Graphics Library Tutorials
- Sorting Algorithms in Programming: Types, Descriptions, and Comparisons
- SQL commands: see what they are, what the main ones are + examples
- SQL Interview Questions and Tasks
- SQL Lessons
- SQL Stored Procedures
- SQL Syntactic Sugar: The COALESCE Function
- Stack
- Start in analytics: Python or R
- Static vs. dynamic data structures
- Statistical analysis: importance for decision making.
- String formatting in Python
- Structure of computer science
- Supervised learning
- Swift Lessons
- switch/match construct
- Syntax
T
- Terms in programming
- Text and paragraph formatting tags
- The Complete Guide to Bootstrap
- The Complete Guide to JavaScript
- The concept of information and its transmission
- The Future of Python: Key Trends and Insights from Global Researc
- The Infrastructure of Code: A Complete Guide to Repositories for Languages, Frameworks, and Compilers
- The pip package manager in Python
- The role of informatization in the development of society
- Transfers
- Tricky Java Questions Often Asked in Interviews
- Tutorials / Articles
- TypeScript: What It Is and Why Developers Need It
W
- What are databases, and why do they need DBMS and SQL?
- What do Linux distributions consist of?
- What is .NET and what is it used for?
- What is a data structure?
- What is a GPU in a computer, in simple terms?
- What is a quantum computer: 100,500 problems in one second
- What Is an Algorithm?
- What is Arduino: How it Works and the Platform's Capabilities
- What is Big Data? Introduction, Types, Characteristics, and Examples
- What is FizzBuzz Challenge?
- What is Golang and what is it used for?
- What is Haskell and what is it used for?
- What is Kotlin and what is it used for?
- What is Linux? The History of Linux
- What is machine learning, and how does it work?
- What is Power BI: everything about the data analytics software
- What is recursion, recursive and iterative process in programming?
- What is the C++ programming language?
- What is the OSI Model: A Complete Explanation of the Seven Layers and Their Role in Networking
- What's the difference between x86 and ARM processors?
- Where to start learning the C programming language?
- Which Linux distribution should you choose? A Linux distribution overview

