As we discussed in the previous post, machine learning is one of the main branches of artificial intelligence, in which we aim to build a rational agent. Machine learning is essential to implementation of artificial intelligence, for it allows agents to adapt to different scenarios, as well as predict changes in evolving environment around them.

There are three main type of machine learning: supervised learning, reinforcement learning, and unsupervised learning. In this blog, we will focus on supervised learning. For those who are interested in the other two types of machine learning, this blog offers a great overview.

Supervised learning, as its name indicates, provides an agent with example inputs and expected outputs to learn from. In most cases, a loss function is used to indicate the difference in predicted or expected results versus the actual outcome. Thus, the less the value of the loss function, the better the agent is, and the agent goes through its learning process by finding the parameters of the model that produces the least loss.

Supervised learning problems are further divided into two main categories: classification and regression.

Agents designed for regression problems deal with numerical outputs in a continuous range. The simplest example of the models are the linear models in which the Agent needs to find a linear function that maps all given inputs to outputs accurately. To do so, the model embeds linear regression methods and retrieves the parameters for the linear function. One of the typical linear regression methods used is the Least Square Method. This solves for parameters of the linear function that produces the least total of the square of the differences between the function and specified input-output pairs. Building more advanced regression models draws in higher-levels of regression methods in regression analysis. It also requires better ways to search for the least loss function values, including Gradient Descent and Simulate Anneal.

On the other hand, classification problems require an Agent to produce a result within a predefined finite set of values, such as various colours or months of a year. These problems are exemplified by the Decision Tree models, which are of the most successful and the simplest machine learning models. A decision tree receives a set of properties and produces simple Boolean values — a “yes” or a “no” — according to whether the set of properties matches predetermined criteria. An example of input-output pairs of whether one should wait for a table in a restaurant is the following, featured in *Artificial Intelligence: A Modern Approach*:

As the Agent learns from given input-output pairs, it decides which property listed should be used as the first criteria, and then which for the second, etc. A typical decision tree generated by this learning model with data above looks like the following:

Before the ending, it is important to address the concept of overfitting in either case. A good supervised learning Agent may not give the least loss function values for training, but they perform more accurately in real cases compared to those with no loss during learning sessions. This is due to noises in the training data set, or sometimes models’ grasping onto non-existent patterns. Therefore, the Agent needs to pass Significance Tests or undergo Pruning to minimize the effect of overfitting.

My next blog will be discussing neural networks, a type of models used to perform classification tasks in supervised learning.

Works Cited

Russell, Stuart J., and Peter Norvig. *Artificial Intelligence: A Modern Approach*. 3rd ed., Boston, Pearson, 2016.

Kislev, Igor. “Decision Tree by Igor Kislev.” *Fine Art America*, fineartamerica.com/featured/1-decision-tree-igor-kislev.html. Accessed 25 Sept. 2017.