Types of Machine Learning


In general, machine learning algorithms can be classified into three types.

(1) Supervised learning

(2) Unsupervised learning

(3) Reinforcement learning      

Additionally, there is a more specific category called semi-supervised learning, which

combines elements of both supervised and unsupervised learning.

Figure 1: Categories of machine learning

1.   Supervised Learning:-

Supervised learning is the machine learning task of learning a function that maps an input to an output based on example input-output pairs.

In supervised learning, each example in the training set is a pair consisting of an input object (typically a vector) and an output value. A supervised learning algorithm analyzes the training data and produces a function, which can be used for mapping new examples. In the optimal case, the function will correctly determine the class labels for unseen instances. Both classification and regression problems are supervised learning problems.

A wide range of supervised learning algorithms are available, each with its strengths and weak- nesses. There is no single learning algorithm that works best on all supervised learning problem.

Figure 1.4: Supervised learning

There are two main categories of supervised learning that are:       

·       Classification

·       Regression

Supervised learning is the subcategory of machine learning that focuses on learning a classification (Figure 2), or regression model (Figure 3), that is, learning from labeled training data (i.e., inputs that also contain the desired outputs or targets; basically, “examples” of what we want to predict).

Figure 2: Illustration of a binary classification problem (plus and minus signs denote class labels) and two feature variables, (x1 and x2). (Source: Raschka & Mirjalili: Python Machine Learning, 3rd Ed.).


Figure 3: Illustration of a linear regression model with one feature variable (x1) and the target variable y. The dashed-line indicates the functional form of the linear regression model. (Source: Raschka & Mirjalili: Python Machine Learning, 3rd Ed.).

Example

Consider the following data regarding patients entering a clinic. The data consists of the gender and age of the patients and each patient is labeled as “healthy” or “sick”.

gender

age

label

M

48

sick

M

67

sick

F

53

healthy

M

49

healthy

F

34

sick

M

21

healthy

Based on this data, when a new patient enters the clinic, how can one predict whether he/she is healthy or sick?

Advantages of Supervised Machine Learning:-

·   Supervised Learning models can have high accuracy as they are trained on labelled data.

· The process of decision-making in supervised learning models is often interpretable.

·     It can often be used in pre-trained models which saves time and resources when developing new models from scratch.

Disadvantages of Supervised Machine Learning:-

·    It has limitations in knowing patterns and may struggle with unseen or unexpected patterns that are not present in the training data.

·      It can be time-consuming and costly as it relies on labeled data only.

·       It may lead to poor generalizations based on new data.

Applications of Supervised Learning:-

Supervised learning is used in a wide variety of applications, including:

·       Image classification: Identify objects, faces, and other features in images.

·   Natural language processing: Extract information from text, such as sentiment, entities, and relationships.

·       Speech recognition: Convert spoken language into text.

·       Recommendation systems: Make personalized recommendations to users.

·   Predictive analytics: Predict outcomes, such as sales, customer churn, and stock prices.

·       Medical diagnosis: Detect diseases and other medical conditions.

·       Fraud detection: Identify fraudulent transactions.

·       Autonomous vehicles: Recognize and respond to objects in the environment.

·       Email spam detection: Classify emails as spam or not spam.

·       Quality control in manufacturing: Inspect products for defects.

·       Credit scoring: Assess the risk of a borrower defaulting on a loan.

·       Gaming: Recognize characters, analyze player behavior, and create NPCs.

·       Customer support: Automate customer support tasks.

·  Weather forecasting: Make predictions for temperature, precipitation, and other meteorological parameters.

·       Sports analytics: Analyze player performance, make game predictions, and optimize strategies.

2.   Unsupervised learning:-

Unsupervised learning is a type of machine learning algorithm used to draw inferences from datasets consisting of input data without labeled responses.

In unsupervised learning algorithms, a classification or categorization is not included in the observations. There are no output values and so there is no estimation of functions. Since the examples given to the learner are unlabeled, the accuracy of the structure that is output by the algorithm cannot be evaluated.

The most common unsupervised learning method is cluster analysis, which is used for ex- ploratory data analysis to find hidden patterns or grouping in data.

Example

Consider the following data regarding patients entering a clinic. The data consists of the gender and age of the patients.

 

gender

 age

M

 48

M

 67

F

 53

M

 49

F

 34

M

 21

Based on this data, can we infer anything regarding the patients entering the clinic?

There are two main categories of unsupervised learning that are:

 

·       Clustering

·       Association 

In contrast to supervised learning, unsupervised learning is a branch of machine learning that is concerned with unlabeled data. Common tasks in unsupervised learning are clustering analysis (assigning group memberships; Figure 4) and dimensionality reduction (compressing data onto a lower-dimensional subspace or manifold).

Figure 4: Illustration of clustering, where the dashed lines indicate potential group membership assignments of unlabeled data points. (Source: Raschka & Mirjalili: Python Machine Learning, 3rd Ed.).

 

Advantages of Unsupervised Machine Learning:-

·     It helps to discover hidden patterns and various relationships between the data.

·     Used for tasks such as customer segmentation, anomaly detection, and data exploration.

·     It does not require labeled data and reduces the effort of data labeling.

Disadvantages of Unsupervised Machine Learning:-

·      Without using labels, it may be difficult to predict the quality of the model’s output.

·      Cluster Interpretability may not be clear and may not have meaningful interpretations.

·      It has techniques such as autoencoders and dimensionality reduction that can be used to extract meaningful features from raw data.

Applications of Unsupervised Learning:-

Here are some common applications of unsupervised learning:

  • Clustering: Group similar data points into clusters.
  •  Anomaly detection: Identify outliers or anomalies in data.
  • Dimensionality reduction: Reduce the dimensionality of data while preserving its essential information.
  • Recommendation systems: Suggest products, movies, or content to users based on their historical behavior or preferences.
  • Topic modeling: Discover latent topics within a collection of documents.
  • Density estimation: Estimate the probability density function of data.Image and video compression: Reduce the amount of storage required for multimedia content.
  • Data preprocessing: Help with data preprocessing tasks such as data cleaning, imputation of missing values, and data scaling.
  • Market basket analysis: Discover associations between products.
  • Genomic data analysis: Identify patterns or group genes with similar expression profiles.
  • Image segmentation: Segment images into meaningful regions.
  • Community detection in social networks: Identify communities or groups of individuals with similar interests or connections.
  • Customer behavior analysis: Uncover patterns and insights for better marketing and product recommendations.
  • Content recommendation: Classify and tag content to make it easier to recommend similar items to users.
  • Exploratory data analysis (EDA): Explore data and gain insights before defining specific tasks. 

3.    Reinforcement learning:-

Reinforcement is the process of learning from rewards while performing a series of actions. In reinforcement learning, we do not tell the learner or agent (for example, a robot), which action to take but merely assign a reward to each action and/or the overall outcome. Instead of having “correct/false” labels for each step, the learner must discover or learn a behavior that maximizes the reward for a series of actions. In that sense, it is not a supervised setting. RL is somewhat related to unsupervised learning; however, reinforcement learning really is its own category of machine learning. Reinforcement learning will not be covered further in this class. However, for those who are interested, Dr. Mirjalili and I wrote an introduction to reinforcement learning for the 3rd edition of “Python Machine Learning.”

Typical applications of reinforcement learning involve playing games (chess, Go, Atari video games) and some form of robots, e.g., drones, warehouse robots, and more recently self- driving cars.

Example:

Consider teaching a dog a new trick: we cannot tell it what to do, but we can reward/punish it if it does the right/wrong thing. It has to find out what it did that made it get the reward/punishment. We can use a similar method to train computers to do many tasks, such as playing backgammon or chess, scheduling jobs, and controlling robot limbs. Reinforcement learning is different from supervised learning. Supervised learning is learning from examples provided by a knowledgeable expert.

Figure 5: Illustration of reinforcement learning (Source: Raschka & Mirjalili: Python Machine Learning, 3rd Ed.).

Advantages of Reinforcement Machine Learning

  • It has autonomous decision-making that is well-suited for tasks and that can learn to make a sequence of decisions, like robotics and game-playing.
  • This technique is preferred to achieve long-term results that are very difficult to achieve.
  • It is used to solve a complex problems that cannot be solved by conventional techniques.

Disadvantages of Reinforcement Machine Learning

  • Training Reinforcement Learning agents can be computationally expensive and time-consuming.
  • Reinforcement learning is not preferable to solving simple problems.
  • It needs a lot of data and a lot of computation, which makes it impractical and costly.

Applications of Reinforcement Machine Learning

Here are some applications of reinforcement learning:

  • Game Playing: RL can teach agents to play games, even complex ones.
  • Robotics: RL can teach robots to perform tasks autonomously.
  • Autonomous Vehicles: RL can help self-driving cars navigate and make decisions.
  • Recommendation Systems: RL can enhance recommendation algorithms by learning user preferences.
  • Healthcare: RL can be used to optimize treatment plans and drug discovery.
  • Natural Language Processing (NLP): RL can be used in dialogue systems and chatbots.
  • Finance and Trading: RL can be used for algorithmic trading.
  • Supply Chain and Inventory Management: RL can be used to optimize supply chain operations.
  • Energy Management: RL can be used to optimize energy consumption.
  • Game AI: RL can be used to create more intelligent and adaptive NPCs in video games.
  • Adaptive Personal Assistants: RL can be used to improve personal assistants.
  • Virtual Reality (VR) and Augmented Reality (AR): RL can be used to create immersive and interactive experiences.
  • Industrial Control: RL can be used to optimize industrial processes.
  • Education: RL can be used to create adaptive learning systems.
  • Agriculture: RL can be used to optimize agricultural operations. 

4.    Semi-supervised learning:-

Loosely speaking, semi-supervised learning can be described as a mix between supervised and unsupervised learning. In semi-supervised learning tasks, some training examples contain outputs, but some do not. We then use the labeled training subset to label the unlabeled portion of the training set, which we then also utilize for model training.



Post a Comment

0 Comments