Machine Learning Notes From AWS

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Machine Learning notes from AWS

- Machine Learning (ML) is a modern software development technique


- It is a type of Artificial Intelligence, that allows computers to solve problems by using examples
of real-world data
- Let’s computers to automatically learn and improve from experience without being
programmed to do so.

Summary

- ML is about the capability of machines to perform activities using human-like intelligence


- There are some techniques in ML such as:
o Supervised Learning: Every training sample from dataset has corresponding label or
output value associated with it. Therefore, the algorithm learns to predict labels or
output values.
o Unsupervised Learning: There are no labels for training data. ML tries to determine any
patterns or distributions that is in the data.
o Reinforcement Learning: The algorithm tries to figure out which actions to take in a
situation to maximize a reward (as a number) on the way to reach a specific goal. This is
completely different form the previous 2 techniques.

How is machine learning different?

- In traditional problem-solving, a person analyses a problem and engineers a solution in code to


solve the problem.
- The downside is that this takes a lot of time and there are too any variables to consider so that
the problems may seem impossible

-
- e.g., If you write a program to see if a cat is in a image, the traditional way would require
attention to detail such as;
o lighting conditions
o types of cats
o various poses
- In ML, the problem solver abstracts away part of their solution as a flexible component called a
model
- They use a program called a model training algorithm to adjust that model to real word data
- The result if a trained model that can be used to predict outcomes that are not part of the
dataset used to train it.
- Therefore, ML automates the statistical reasoning and pattern-matching the problem solver
would traditionally do and save a lot of time and effort

-
- This is a new field created at the intersection of statistics, applied math, and computer science.
- These fields, have slightly different formal definitions of the same terms

Terminology

- Machine Learning: Modern software development technique that enables computers to solve
problems by using examples of real-world data
- Supervised learning: Every training sample from the dataset has a corresponding label or output
value associated with it. Therefore, the algorithm learns to predict labels or output values.
- Unsupervised Learning: no labels for the training data. A machine learning algorithm tries to
learn the underlying patterns or distributions that govern the data.
- Reinforcement Learning: Algorithm figures which actions to take in a situation to maximize a
reward on the way to reaching a specific goal.

Components of ML

- All tasks solved with ML use three primary components:


o ML model
o Model training algorithm
o Model inference algorithm
- A ML model can be molded and serve many different purposes
- Model: extremely generic program (or block of code), made specific by the data used to train it.
It is used to solve different problems.

Examples

- Imagine you own a snow cone cart, and you have some data about the average number of snow
cones sold per day based on the high temperature. You want to better understand this
relationship to make sure you have enough inventory on hand for those high sales days.
- In the graph above, you can see one example of a model, a linear regression model (indicated by
the solid line). You can see that, based on the data provided, the model predicts that as the high
temperate for the day increases so do the average number of snow cones sold. Sweet!
-
- Let's look at a different example that uses the same linear regression model, but with different
data and to answer completely different questions.
- Imagine that you work in higher education, and you want to better understand the relationship
between the cost of enrollment and the number of students attending college. In this example,
our model predicts that as the cost of tuition increases the number of people attending college
is likely to decrease.
- Using the same linear regression model (indicated by the solid line), you can see that the
number of people attending college does go down as the cost increases.

- Both examples showcase that a model is a generic program made specific by the data used to
train it.

Model Inference: Using Your Trained Model


- Now you have our completed teapot. You inspected the clay, evaluated the changes that
needed to be made, and made them, and now the teapot is ready for you to use. Enjoy your tea!
- So what does this mean from a machine learning perspective? We are ready to use the model
inference algorithm to generate predictions using the trained model. This process is often
referred to as model inference.

Terminology

A model is an extremely generic program, made specific by the data used to train it.

Model training algorithms work through an interactive process where the current model iteration is
analyzed to determine what changes can be made to get closer to the goal. Those changes are made and
the iteration continues until the model is evaluated to meet the goals.

Model inference is when the trained model is used to generate predictions.

How to do you start a Machine Learning task?


In the preceding diagram, you can see an outline of the major steps of the machine
learning process. Regardless of the specific model or training algorithm used,
machine learning practitioners practice a common workflow to accomplish machine
learning tasks.

These steps are iterative. In practice, that means that at each step along the process,
you review how the process is going. Are things operating as you expected? If not,
go back and revisit your current step or previous steps to try and identify the
breakdown.

 Define a very specific task.


 Think back to the snow cone sales example. Now imagine that you
own a frozen treats store and you sell snow cones along with many
other products. You wonder, "‘How do I increase sales?" It's a valid
question, but it's the opposite of a very specific task. The following
examples demonstrate how a machine learning practitioner might
attempt to answer that question.
 “Does adding a $1.00 charge for sprinkles on a hot fudge
sundae increase the sales of hot fudge sundaes?”
 “Does adding a $0.50 charge for organic flavors in your snow
cone increase the sales of snow cones?”
 Identify the machine learning task we might use to solve this problem.
 This helps you better understand the data you need for a project.

What is a Machine Learning Task?


All model training algorithms, and the models themselves, take data as their input.
Their outputs can be very different and are classified into a few different groups
based on the task  they are designed to solve. Often, we use the kind of data
required to train a model as part of defining a machine learning task.

In this lesson, we will focus on two common machine learning tasks:

 Supervised learning
 Unsupervised learning

You might also like