Machine Learning Foundation with AWS

Sajjad Rahman - Sep 1 - - Dev Community

This is a short overview of an introduction to machine learning and AWS services for ML.

What is Machine Learning?

Machine Learning is a subfield of Artificial Intelligence. When faced with a complex situation requiring the discovery of patterns to solve a particular problem, a machine can effectively solve it by identifying patterns from the given data.

Machine Learning Workflow

Data --> Model --> Output

Whether we discuss Machine Learning or Deep Learning, they both rely heavily on data—it is their fuel. These models learn and identify patterns from the data. So, how does machine learning work? Let's break it down simply:
ML Pipeline

Image Source: Amazon Machine Learning Course

Types of ML Problems

Machine Learning problems are generally categorized into three types: Supervised Learning, Unsupervised Learning, and Reinforcement Learning.
Types of ML Problems

Supervised Learning

In supervised learning, the machine is trained with labeled data. During training, the machine knows both the input and the corresponding output. Based on this, it learns a pattern, and when it encounters new data, it predicts the label based on the learned pattern. Supervised learning techniques are widely used in the real world.

Supervised Learning

In the figure, the machine is provided with input data (e.g., an image of a car) along with an output label (e.g., "this is an Audi car," "this is a Toyota car"). After training on the data, the model identifies unique patterns and uses these patterns to predict the label of a new car image.

Unsupervised Learning
Unsupervised Learning
In unsupervised learning, the training data does not come with labels. The model identifies patterns and forms groups on its own. For example, if we have 100 images of both males and females but no tags indicating whether each image is of a male or female, the model will identify common and unique features of the images, compare them with other images, and categorize them into two groups.

Types of ML Algorithms

Depending on the problem, there are several types of ML algorithms. Let’s start with the basic ones:

  1. Binary Classification:

    Binary classification is when we have to choose one option from two. We can select either yes or no, but not both at the same time. For example, identifying from a picture whether it is a cat or a dog. If we mark it as a dog, the problem is known as a Binary Classification Problem.
    Binary Classification

  2. Multi-class Classification:

    Multi-class classification refers to situations where there are more than two classes. In real-world scenarios, there are several multi-class classification problems. For example, if we have a large dataset with 10 categories, we have 10 options for classifying an image.

  3. Regression:

    In this case, the model predicts a continuous value rather than a classification. House price prediction is a common example when learning about regression problems. Based on factors like the number of rooms and the size of the house, the model predicts a price value.

Classical Programming vs. Machine Learning

When we have rule-based problems, we usually choose classical programming to solve them. However, if we cannot find a pattern, we handle it via machine learning.

If the scenario is small, simple, and straightforward, we can use classical programming. But if the case is large and requires identifying unique patterns, we should opt for Machine Learning. For instance, consider email classification—determining if an email is spam or not. As humans, we can easily identify spam. However, if we have 10k or 10M emails, this would be a very time-consuming task for humans. This is where Machine Learning comes in and solves the problem within an hour.

To sum up, if the case is simple with fewer conditions, classical programming is suitable. Otherwise, Machine Learning is the better approach.

ML on AWS

AWS Cloud offers more than 200 services, with Amazon SageMaker being top-notch for providing ML services. We all know that ML requires computational resources for training a model. SageMaker is cost-effective, and it allows us to develop a complete pipeline.
AWS SageMaker

With Amazon SageMaker, we can train, deploy, and manage everything. You can learn more from the AWS main site. In an upcoming post, we will discuss the details of Amazon SageMaker.

Reference : AWS ML Fundamental Course
AWS SAGEMAKER

. . . . . . . . . . . .
Terabox Video Player