Skip to Main Content

Introduction to Artificial Intelligence (AI)

This guide introduces AI and its subfields along with some terminology associated with it.

What is Machine Learning?

A machine is said to be "learning" if its performance or efficiency for a given task improves with the experience (past data). Machine Learning uses advanced algorithms to analyze and learn relationships between the data to make intelligent decisions on what it has learned. The algorithms use a large amount of data to find the relationship. This relationship is called a "model" which is used to make useful predictions or generate content from the data. 

For example, we need physics-based mathematical equations of Earth's atmosphere to 
predict rainfall using traditional methods. Solving these complex equations requires massive computing resources and time, making the prediction task difficult. With the ML approach, we could provide enormous data to an ML model until the ML model eventually learned the mathematical relationship between weather factors producing varying quantities of rain. If we give this model the current weather data, it would predict the amount of rain in the future.

Figure 1 shows the difference between hardcoding the instructions to carry out a specific task versus using ML.

 

                                                                                                                                                              Figure 1: Achieving a task with and without ML [1]

How generic AI differs from ML?

AI system: Recommend songs to EVERYONE based on number of copies sold, top 10 in Billboard list, Grammy award winners, etc.

ML system: Recommend songs to each INDIVIDUAL based on previous songs played, other people with similar playlist, choice of singer, genre, etc.

When using Machine Learning, Neural Networks, or Deep Learning, it is important to know the meaning of the following terms:

  • Task: Refers to a specific problem or objective that the algorithm is designed to solve. 
  • Algorithm: Set of rules that a machine follows to achieve a particular goal or the steps needed to get from the inputs to the output.
  • Features (attributes or variables): Observed/measured properties or characteristics of the data that are used as input to create a model.
  • Target: Variable whose value is predicted or modeled by the features; used in supervised learning.
  • Label: It is the category or class of the target variable. If only 2 labels (such as 0 or 1, yes/no, hot/warm/cold).
  • Training set: Subset of data on which the model is initially trained.
  • Validation set: Subset of data (distinct from training) that is used by the model to predict output and validate the model.
  • Test set: Subset of data (different from training and validation) on which model is tested.

What are the different types of Machine Learning?

There are 4 major types of ML problems:

  1. Supervised learning: Used for tasks where the target variable has defined labels or values.
    1. Classification: The target variable has 2 labels (binary class classification) or more (multiclass classification). For example:
      1. Whether USA will win or lose a match (binary).
      2. Gmail classifying email in classes like social, promotion, updates, or spam (multiclass).
    2. Regression: The output is numeric and has a continuous value and the task is to predict a value as closer to the actual output value. For example predict stock price of a stock.
  2. Unsupervised learning: Used for tasks where the target variable or output has no defined labels and hidden patterns in the data are discovered without human intervention.
    1. Clustering: Discovering the inherent groupings in the data such as grouping customers by their purchasing behavior.
    2. Association: Discover rules that describe large portions of the data, such as people that buy X also tend to buy Y
  3. Semi-supervised learning: This is a hybrid technique between supervised and unsupervised learning, utilizing both labeled and unlabeled data.
  4. Reinforcement learning: Learning happens by taking suitable action to maximize "reward" in a particular situation. It is employed by various software and machines to find the best possible behavior or path to take in a specific situation. If there is no training data, it is bound to learn from its experience. "Reward" is defined by the experts.

Figure (2) gives the example of  supervised and unsupervised Learning. In figure (2), the classification task is to predict if the user has purchased or not (1 or 0). The regression task is to predict the wind speed.

                                       

                                                                 Figure 2: Example of supervised and unsupervised learning