 There is a lot of excitement behind these two topics, so this serves as a quick guide on what they are and what’s the difference.

## Artificial Intelligence

The term Artificial Intelligence was coined by John McCarthy, a PhD in mathematics, who described the field as the “science and engineering of making intelligent machines, especially intelligent computer programs.” This is a very broad definition; Most experts will accept a definition that describes AI in some way as programs that learn and/or can do problem-solving. Machine learning is one of the subdomains of AI. There are other subdomains of AI, such as ontology creation (which seeks to create a taxonomy of a subject), and common sense reasoning (you enter your kitchen and see a drawer open, you infer that someone opened the drawer). The reason these other fields of AI haven’t gained as much popularity as machine learning is that they have been more difficult to develop, reasonably simple models work well for ML, and ML has already been generating profit.

## Machine Learning

Machine learning is about the creation of mathematical models, that self-optimize their variables (usually called parameters) for a given task. These models are self-optimized on a set of data called a training set and then applied to the real world. Some of these models have existed longer than computers, but with computers, we are now able to store more data, perform calculations much faster, apply the trained ML models to new data. There are three subdomains of ML, each with different methods of development and use.

### Supervised Learning

In supervised learning, we try to predict a specific outcome. This outcome can be discrete (Will a person make a purchase? or Hot Dog or Not Hot Dog?) or continuous (How much will this house be sold for? What will the share price of this stock be in 1 month?). In supervised learning we measure error in some way and seek to minimize it.

Regression is when we try to predict a value from a continuous spectrum. The simplest example of this is linear regression, which draws a straight line through your data points. In this example the mathematical model we made is y = m*x + b and the self-optimization is applied to the m and b parameters. Our predictions for y-values at any given x-value can be found in the red line. A measurement of error here is distance between each blue point and the red line.

Classification is the prediction of a discrete value, as the name implies we try to classify data points into two groups. For example you can predict the probability someone survived the Titanic with a machine learning model called a decision tree (shown below). Here we try to optimize the accuracy of the model, meaning the percent of time our model was correct in its prediction.