Last updated: 3rd Jan, 2024
Machine learning is a machine’s ability to learn from data. It has been around for decades, but machine learning is now being applied in nearly every industry and job function. In this blog post, we’ll cover a detailed introduction to what is machine learning (ML) including different definitions. We will also learn about different types of machine learning tasks, algorithms, etc along with real-world examples.
Definition 1: Simply speaking, machine learning can be defined as an approach to model our beliefs about real-world events. For example, let’s say a person came to a doctor with a certain blood report. A doctor based on his belief system learned using his/her experience & knowledge, predicts (decides essentially) whether the person is suffering from a disease or otherwise. When the human belief system is not good enough for reasons such as evaluating a large amount of different data to arrive at a decision, we can, then, replace “human belief system” with a AI / machine learning system (one or more models) and “experience and knowledge” with data which is fed into this AI / ML system. Doctors can as well use ML models trained using past data along with his experience & intelligence to predict whether the person suffers from a disease or not.
When human and machine learning intelligence is used in combination, it is also termed as an augmented system. When the system can rely solely on the AI-based decisions, the system can be called as an autonomous system. How well these beliefs correspond with reality is what is learned by the doctor over a period of time. In the machine learning world, we have a “cost function” or “loss function” that is learned to ensure that the prediction is closer to reality.
Definition 2: Technically speaking, machine learning can be defined as a technology where in machine learns to perform a prediction/estimation task based on past experience represented by a historical data set. There are three key aspects of machine learning which are the following:
Definition 3: Mathematically speaking, building machine learning models can be defined as an approach to approximating mathematical functions (equations) representing real-world scenarios. These mathematical functions are often referred to as “mathematical models” or just models. Machine learning models can as well be defined as mathematical equations/functions that represent or model real-world problems/scenarios. The reason why machine learning models are called function approximations is because it will be extremely difficult to find exact functions which can be used to exactly represent the real-world and predict or estimate real-world scenarios. Here is an illustration of simple mathematical function which can be learned using the data.
The function could as well be used to map the image to the image content or label. Here is the illustration:
imageContent = f(image)
The picture below represents how the above function could be used to map cat in the picture to cat and dog in the picture to dog.
The diagram below represents two different kinds of mathematical functions, one representing the line (left) that divides the data points, and the other representing the line (right – regression) which can be used to predict the data points. The left line represents the decision boundary of classification function or model which is learned with the given data points. The right line (regression – best fit line) can be called a regression function or model which is learned from the given data points.
Models can be reduced to mathematical functions that map an input (the observed data) to a result (the predictions). Some mathematical functions are more complex than others, in the number of internal parameters they have and in the ways they use them. – The Kaggle Book
Here is the philosophical way to look at machine learning.
Definition 4: Machine learning can be defined as a technology that can be used to create a “mathematical form” or “mathematical being” or a “machine” that is capable to perform certain pre-defined tasks (estimate or predict) given a set of inputs. The “mathematical form” or the “machine” is composed of a set of levers that work together to create a pre-defined desired output. The “levers” can be thought of as “features”. How the “mathematical form” or “machine” needs to work together depends upon different algorithms called machine learning algorithms. Different “machines” or models get created based on the historical dataset and different algorithms. These “mathematical forms” are created by what we call “data scientists” or machine learning engineers. And, there are well-defined processes and tools that can be used for creating these “machines” (training/testing process). The most fundamental aspects of building machine learning models include computations based on the given data, that can be used to learn to build a model representing real-world problems/scenarios.
Machine learning is different from traditional programming in the way that the output in the case of machine learning is the rules based on which predictions are made whereas the input is answered (labels) and data. Input and output data are used with machine learning algorithms to output rules/programs (model). The picture below represents this difference:
Here is another way of looking at how machine learning is different than the traditional programming:
The diagram below represents machine learning models in the training and inference (prediction) phase.
Check out my related blog on machine learning terminologies for beginners. You may also want to check out the following video from Google:
Machine learning is also referred to as deep learning depending on the algorithms used to build the models. When neural network algorithms are used, model building is termed deep learning.
The following represents different aspects related to how machine learning models are trained for making predictions. The diagram below represents supervised learning models where the training data consists of features information and related labels. The training data is used to train the model which them makes prediction (prediction labels) on the test data.
There are eight key components of a machine learning model.
Here is another view of how a machine learning model is trained and tested based on supervised learning.
Based on the above, one can understand how machine learning models are built for supervised learning problems. There are two functions involved in machine learning. One is a function (approximation) representing a machine learning model and the other is an objective function that needs to be optimized. While optimizing the objective function, the parameters and hyperparameters are learned.
The following are some of the examples of machine learning models or function approximations:
When human intelligence is not good enough to make decisions based on past experience and available data, one can rely on artificial intelligence to help make decisions. When the decisions (based on the predictions) need to be made based on large number of parameters which makes it difficult for humans, machine learning can be used. Artificial intelligence systems such as the machine learning systems comprising of one or more models help make predictions by learning from historic data set. That said, the decisions made based on the output (predictions) of machine learning models need to be monitored over a period of time in order to adopt the ML system across the enterprise. This aspect of decision making driven by the data is also called as data-driven decision-making and ML systems play a key role in this.
The following represents some of the key stages in which machine learning models are trained, deployed, and monitored. Check out the related post.
Here is a diagram representing different stages of building machine learning models.
The following is the detailed workflow for building machine learning model. The image is taken from the book, Machine Learning with PyTorch and Scikit-Learn. This is a great book if you would like to learn about machine learning concepts with PyTorch and Scikit-learn.
Machine learning algorithms are algorithms that are used to solve a different kinds of problems by learning machine learning parameters, hyperparameters, etc. The following are different kinds of machine learning algorithms:
Machine learning algorithms are used to train one or more machine learning models having different parameters and hyperparameters. Model selection techniques are then used to select the most appropriate machine learning model from the set of machine learning models that have been trained. Note that the most appropriate machine learning model is the one that generalizes well to the unseen data.
A problem can be solved using different machine learning algorithms and for each machine learning algorithm, there can be multiple different models. One can go for algorithm and model selection techniques to select the most appropriate algorithm and model.
The following are the five most common types of machine learning tasks:
AI is a much broader field that includes machine learning. Machine Learning can be called a subset of Artificial Intelligence which deals specifically with using algorithms that can learn from data without being explicitly programmed.
Deep learning can be called a subset of machine learning which deals with algorithms that can learn from data using many hidden layers in the model. Deep learning is used to learn the complex representations of data which helps build better machine learning models. Note that another word for representation is the feature. Better selection of features or representations can result in better models and this is where deep learning comes of great help. Complex problems related to image classifications, machine translations, natural language processing tasks, etc. can be solved using deep learning algorithms.
Data science is a field that includes machine learning/deep learning, linear algebra, probability and statistics, and computer programming. Data scientists are people who apply machine learning algorithms to large datasets to create useful products from the data like predictive models etc. Read a detailed post on what is data science?
The answer is Yes and No. If you are a data scientist who is very familiar with programming, you could use programming languages like Python, R, or Julia to implement machine learning algorithms. However, product managers and/or machine learning engineers usually use tools and libraries which can be used without programming languages so they don’t need to be familiar with the programming language data scientists use for the implementation of machine learning models.
There are various cloud services that have machine learning algorithms implemented in them so you don’t need to know how they are working internally. Some machine learning tools and libraries include TensorFlow, Scikit-learn, etc. These machine learning tools can be used with programming languages or without knowing any language making it easy for product managers/machine Learning engineers who want to create predictive models. You might want to check services such as Google cloud bigquery ML which makes it so easy to train the model.
The following are different popular cloud services that provide machine learning algorithms implemented in them so you don’t need to know how machine learning models are working internally.
Those who build machine learning models are called data scientists. People who are data scientists usually have the following skills/knowledge:
Automated machine learning (AutoML) is the automation of building machine learning models. AutoML automates different machine learning tasks in machine learning workflow such as data cleaning, feature engineering, hyperparameter tuning, etc. such that data scientists could focus on business problems and making machine learning models better instead of spending time on the tedious machine learning tasks. There are different AutoML libraries available for machine learning problems such as Auto-sklearn, H20.ai, etc.
Machine learning is a subset of artificial intelligence that deals specifically with machine learning algorithms that are able to learn from data without being explicitly programmed. Data Science, Deep Learning, and Machine Learning are all related but have different purposes – deep learning is focused on machine algorithms that can learn from data using many hidden layers while machine learning focuses more broadly on machine algorithm’s ability to learn by itself. Another class of learning is reinforcement learning which trains agents to act in different scenarios by receiving rewards or punishment for their actions; this type of machine learning allows machines to make decisions based on what will give them the most reward. There are machine learning tools and libraries which can be used without programming languages making it easy for product managers, machine learning engineers and data scientists/analysts to create predictive models by using machine learning algorithms that learn from data partially or fully labeled. If you are looking to learn more about machine learning and different applications, please reach out to us.!
In recent years, artificial intelligence (AI) has evolved to include more sophisticated and capable agents,…
Adaptive learning helps in tailoring learning experiences to fit the unique needs of each student.…
With the increasing demand for more powerful machine learning (ML) systems that can handle diverse…
Anxiety is a common mental health condition that affects millions of people around the world.…
In machine learning, confounder features or variables can significantly affect the accuracy and validity of…
Last updated: 26 Sept, 2024 Credit card fraud detection is a major concern for credit…