ML Links
ML Links
ML Links
Introduction
- https://www.javatpoint.com/machine-learning
- https://www.javatpoint.com/applications-of-machine-learning
- https://www.javatpoint.com/machine-learning-life-cycle
- https://www.javatpoint.com/difference-between-artificial-intelligence-and-machine-
learning
- https://www.geeksforgeeks.org/kdd-process-in-data-mining/
2. Supervised Learning
- https://www.javatpoint.com/supervised-machine-learning
- https://blog.dataiku.com/top-machine-learning-algorithms-how-they-work-in-plain-
english-1
- https://www.scaler.com/topics/linear-models-in-machine-learning/
- https://www.techtarget.com/searchenterpriseai/definition/supervised-learning
3. Unsupervised Learning
- https://www.guru99.com/unsupervised-machine-learning.html
- https://www.javatpoint.com/unsupervised-machine-learning
- https://www.javatpoint.com/clustering-in-machine
learning#:~:text=Clustering%20or%20cluster%20analysis%20is,consisting%20of%20similar
%20d
ata%20points.
- https://www.geeksforgeeks.org/what-is-reinforcement-learning/
4. Artificial Neural Network (ANN) (Use the Slide and the below URLS)
- https://www.analyticsvidhya.com/blog/2021/05/beginners-guide-to-artificial-neural-
network/
- https://medium.com/analytics-vidhya/how-do-neural-networks-really-work-in-the-deep
learning-72f0e8c4c419
- https://www.nickmccullum.com/python-deep-learning/how-do-neural-networks-really-
work/
- https://towardsdatascience.com/a-beginner-friendly-explanation-of-how-neural-networks
work-55064db60df4
- https://www.datacamp.com/tutorial/convolutional-neural-networks-python
- https://www.analyticsvidhya.com/blog/2021/08/beginners-guide-to-convolutional-neural
network-with-implementation-in
python/#:~:text=Convolutional%20Neural%20Network%20is%20a,based%20on%20the
%20learn
ed%20features.
- https://medium.com/machine-learning-researcher/convlutional-neural-network-cnn-
2fc4faa7bb63
5. Model Evaluation (Use the Slide only)
Machine Learning Tutorial
1. Supervised learning
2. Unsupervised learning
3. Reinforcement learning
1) Supervised Learning
Supervised learning is a type of machine learning method in which
we provide sample labeled data to the machine learning system in
order to train it, and on that basis, it predicts the output.
The goal of supervised learning is to map input data with the output
data. The supervised learning is based on supervision, and it is the
same as when a student learns things in the supervision of the
teacher. The example of supervised learning is spam filtering.
o Classification
o Regression
2) Unsupervised Learning
Unsupervised learning is a learning method in which a machine
learns without any supervision.
The training is provided to the machine with the set of data that has
not been labeled, classified, or categorized, and the algorithm needs
to act on that data without any supervision. The goal of
unsupervised learning is to restructure the input data into new
features or a group of objects with similar patterns.
o Clustering
o Association
3) Reinforcement Learning
Reinforcement learning is a feedback-based learning method, in
which a learning agent gets a reward for each right action and gets
a penalty for each wrong action. The agent learns automatically with
these feedbacks and improves its performance. In reinforcement
learning, the agent interacts with the environment and explores it.
The goal of an agent is to get the most reward points, and hence, it
improves its performance.
o The duration of 1974 to 1980 was the tough time for AI and
ML researchers, and this duration was called as AI winter.
o In this duration, failure of machine translation occurred, and
people had reduced their interest from AI, which led to
reduced funding by the government to the researches.
Prerequisites
Before learning machine learning, you must have the basic
knowledge of followings so that you can easily understand the
concepts of machine learning:
Audience
Our Machine learning tutorial is designed to help beginner and
professionals.
Problems
We assure you that you will not find any difficulty while learning our
Machine learning tutorial. But if there is any mistake in this tutorial,
kindly post the problem or error in the contact form so that we can
improve it.
Applications of Machine learning
Machine learning is a buzzword for today's technology, and it is
growing very rapidly day by day. We are using machine learning in
our daily life even without knowing it such as Google Maps, Google
assistant, Alexa, etc. Below are some most trending real-world
applications of Machine Learning:
1. Image Recognition:
Image recognition is one of the most common applications of
machine learning. It is used to identify objects, persons, places,
digital images, etc. The popular use case of image recognition and
face detection is, Automatic friend tagging suggestion:
Play Video
2. Speech Recognition
While using Google, we get an option of "Search by voice," it
comes under speech recognition, and it's a popular application of
machine learning.
3. Traffic prediction:
If we want to visit a new place, we take help of Google Maps, which
shows us the correct path with the shortest route and predicts the
traffic conditions.
o Real Time location of the vehicle form Google Map app and
sensors
o Average time has taken on past days at the same time.
Everyone who is using Google Map is helping this app to make it
better. It takes information from the user and sends back to its
database to improve the performance.
4. Product recommendations:
Machine learning is widely used by various e-commerce and
entertainment companies such as Amazon, Netflix, etc., for
product recommendation to the user. Whenever we search for some
product on Amazon, then we started getting an advertisement for
the same product while internet surfing on the same browser and
this is because of machine learning.
5. Self-driving cars:
One of the most exciting applications of machine learning is self-
driving cars. Machine learning plays a significant role in self-driving
cars. Tesla, the most popular car manufacturing company is working
on self-driving car. It is using unsupervised learning method to train
the car models to detect people and objects while driving.
o Content Filter
o Header filter
o General blacklists filter
o Rules-based filters
o Permission filters
These assistant record our voice instructions, send it over the server
on a cloud, and decode it using ML algorithms and act accordingly.
o Gathering Data
o Data preparation
o Data Wrangling
o Analyse Data
o Train the model
o Test the model
o Deployment
23.9K
Machine Learning - Preprocessing Structured Data - Detecting Outliers
1. Gathering Data:
Data Gathering is the first step of the machine learning life cycle.
The goal of this step is to identify and obtain all data-related
problems.
2. Data preparation
After collecting the data, we need to prepare it for further steps.
Data preparation is a step where we put our data into a suitable
place and prepare it to use in our machine learning training.
In this step, first, we put all data together, and then randomize the
ordering of data.
o Data exploration:
It is used to understand the nature of data that we have to
work with. We need to understand the characteristics, format,
and quality of data.
A better understanding of data leads to an effective outcome.
In this, we find Correlations, general trends, and outliers.
o Data pre-processing:
Now the next step is preprocessing of data for its analysis.
3. Data Wrangling
Data wrangling is the process of cleaning and converting raw data
into a useable format. It is the process of cleaning the data,
selecting the variable to use, and transforming the data in a proper
format to make it more suitable for analysis in the next step. It is
one of the most important steps of the complete process. Cleaning
of data is required to address the quality issues.
o Missing Values
o Duplicate data
o Invalid data
o Noise
4. Data Analysis
Now the cleaned and prepared data is passed on to the analysis
step. This step involves:
Hence, in this step, we take the data and use machine learning
algorithms to build the model.
5. Train Model
Now the next step is to train the model, in this step we train our
model to improve its performance for better outcome of the
problem.
6. Test Model
Once our machine learning model has been trained on a given
dataset, then we test the model. In this step, we check for the
accuracy of our model by providing a test dataset to it.
7. Deployment
The last step of machine learning life cycle is deployment, where we
deploy the model in the real-world system.
Play Video
Artificial Intelligence
Artificial intelligence is a field of computer science which makes a
computer system that can mimic human intelligence. It is comprised
of two words "Artificial" and "intelligence", which means "a
human-made thinking power." Hence we can define it as,
o Weak AI
o General AI
o Strong AI
Currently, we are working with weak AI and general AI. The future of
AI is Strong AI for which it is said that it will be intelligent than
humans.
Machine learning
Machine learning is about extracting knowledge from the data. It
can be defined as,
o Supervised learning
o Reinforcement learning
o Unsupervised learning
The goal of AI is to make a The goal of ML is to allow machines to learn from data so that
smart computer system like output.
humans to solve complex
problems.
In AI, we make intelligent In ML, we teach machines with data to perform a particular tas
systems to perform any task result.
like a human.
Machine learning and deep Deep learning is a main subset of machine learning.
learning are the two main
subsets of AI.
AI is working to create an Machine learning is working to create machines that can perform
intelligent system which can for which they are trained.
perform various complex
tasks.
AI system is concerned Machine learning is mainly concerned about accuracy and pattern
about maximizing the
chances of success.
The main applications of AI The main applications of machine learning are Online recomm
are Siri, customer support search algorithms, Facebook auto friend tagging suggestio
using catboats, Expert
System, Online game
playing, intelligent
humanoid robot, etc.
On the basis of capabilities, Machine learning can also be divided into mainly three type
AI can be divided into three learning, Unsupervised learning, and Reinforcement learnin
types, which are, Weak
AI, General AI, and Strong
AI.
It includes learning, It includes learning and self-correction when introduced with new
reasoning, and self-
correction.
AI completely deals with Machine learning deals with Structured and semi-structured data.
Structured, semi-structured,
and unstructured data.
· Read
· Discuss
Data Mining – Knowledge Discovery in Databases(KDD).
KDD (Knowledge Discovery in Databases) is a process that
involves the extraction of useful, previously unknown, and
potentially valuable information from large datasets. The KDD
process in data mining typically involves the following steps:
1. Selection: Select a relevant subset of the data for analysis.
2. Pre-processing: Clean and transform the data to make it
ready for analysis. This may include tasks such as data
normalization, missing value handling, and data integration.
3. Transformation: Transform the data into a format suitable
for data mining, such as a matrix or a graph.
4. Data Mining: Apply data mining techniques and algorithms to
the data to extract useful information and insights. This may
include tasks such as clustering, classification, association rule
mining, and anomaly detection.
5. Interpretation: Interpret the results and extract knowledge
from the data. This may include tasks such as visualizing the
results, evaluating the quality of the discovered patterns and
identifying relationships and associations among the data.
6. Evaluation: Evaluate the results to ensure that the extracted
knowledge is useful, accurate, and meaningful.
7. Deployment: Use the discovered knowledge to solve the
business problem and make decisions.
The KDD process is an iterative process and it requires multiple
iterations of the above steps to extract accurate knowledge from
the data.
Why do we need Data Mining?
Volume of information is increasing everyday than we can handle
from business transactions, scientific data, sensor data, Pictures,
videos, etc. So, we need a system that will be capable of
extracting essence of information available and that can
automatically generate report,
views or summary of data for better decision-making.
Why Data Mining is used in Business?
Data mining is used in business to make better managerial
decisions by:
Disadvantages of KDD:
Play Video
Now, after training, we test our model using the test set, and the
task of the model is to identify the shape.
o Linear Regression
o Regression Trees
o Non-Linear Regression
o Bayesian Linear Regression
o Polynomial Regression
2. Classification
Spam Filtering,
o Random Forest
o Decision Trees
o Logistic Regression
o Support vector Machines
Machine
Learning and
Linear Models:
How They Work
(In Plain
English)
February 20, 2020
This series will go over at a high level what machine learning is plus take a deeper
dive into some of the top algorithms and how they work — in plain English!
Specifically, we're usually talking about machine learning, which means teaching a
machine to learn from experience without explicitly programming it to do so. Deep
learning, another hot topic, is a subset of machine learning and has been largely
responsible for the AI boom of the last 10 years. In a nutshell, deep learning is an
advanced type of ML that can handle complex tasks like image and sound
recognition. We’ll discuss it in more detail in a later post.
One other thing worth mentioning about AI is that we sort of have this "Instagram vs.
reality" scenario, if you will. That is, the way AI is portrayed in pop culture is not
necessarily representative of where we’re at today. The examples of AI that we see in
the media are usually “Artificial General Intelligence” or “Strong AI,” which refer to
AI with the full intellectual capacity of a human, including thoughts and self-
awareness. Think “Westworld,” “The Terminator,” “Ex Machina,” etc.
The good news is you can sleep soundly tonight knowing that this does not currently
exist, and we’re probably still pretty far away from it — if it is even possible at all,
which is up for debate. The closest thing we have to Strong AI today is voice
assistants like Amazon's Alexa and Apple's Siri, but they’re pretty far away from
having thoughts and feelings, and there are obviously serious concerns around ever
creating AI with this level of human intelligence.
The AI/ML that we actually interact with in our day-to-day lives is usually “Weak
AI,” which means that it is programmed to do one specific task. This includes things
like credit card fraud detection, spam email classification, and movie
recommendations on Netflix.
Supervised ML, which uses a set of input variables to predict the value of an output variable.
Unsupervised ML, which infers patterns from an unlabeled dataset. Here, you aren’t trying to predict
anything, you’re just trying to understand patterns and groupings in the data.
We will focus on supervised ML in this post. The idea is that we will look at historical
data to train a model to learn the relationships between features, or variables, and
a target, the thing we’re trying to predict. This way, when new data comes in, we can
use the feature values to make a good prediction of the target, whose value we do not
yet know.
Supervised learning can be further split into regression (predicting numerical values)
and classification (predicting categorical values). Some algorithms can only be used
for regression, others only for classification, and many for both.
Algorithms 101
We hear — and talk — a lot about algorithms, but I find that the definition is
sometimes a bit of a blur. An algorithm is actually just a set of rules used to solve a
problem. If you’ve ever taken a simple BuzzFeed quiz to answer important questions
in your life, like what “Sound of Music” character matches your personality — you
may notice that it’s really just asking a series of questions and using some set logic to
generate an answer. Let’s explore the key categories of supervised learning
algorithms.
Many of the most popular supervised learning algorithms fall into three key
categories:
. Linear models, which use a simple formula to find a best-fit line through a set of data points.
. Tree-based models, which use a series of “if-then” rules to generate predictions from one or more
decision trees, similar to the BuzzFeed quiz example.
. Artificial neural networks, which are modeled after the way that neurons interact in the human brain
to interpret information and solve problems. This is also often referred to as deep learning.
We will look into each of these algorithm categories throughout the series, but this
post will focus on linear models.
Machine Learning
Algorithms in
Action: Practical
Examples
Let's say we're the owners of a candy store, Willy Wonka’s Candy, and we want to do
a better job of predicting how much our customers will spend this week, in order to
stock our shelves more appropriately. To get even more specific, let’s explore one
specific customer named George. George is a 65-year-old mechanic who has children
and spent $10 at our store last week. We’re going to try to predict the following:
How much George will spend this week (hint: this is regression, because it is a dollar amount).
Whether George will be a “high spender,” which we’ve defined as someone who will spend at least
$25 at Willy Wonka's Candy this week (hint: this is a classification, because we’re predicting a distinct
category, high spender or not).
Linear Models
So now let’s dive in and see how we can use a linear model. Remember, linear models
generate a formula to create a best-fit line to predict unknown values. Linear models
are considered “old school” and often not as predictive as newer algorithm classes,
but they can be trained relatively quickly and are generally more straightforward to
interpret, which can be a big plus!
Okay, let’s imagine we have a simple model in which we’re trying to just use age to
predict how much George will spend at Willy Wonka’s Candy this week.
The data points we used to train our model are in blue. The red line is the line of best
fit, which the model generated, and captures the direction of those points as best as
possible.
Here, it looks like the older somebody is, the more money they will spend. We know
George is 65, so we’ll find 65 on the x-axis and follow the green dotted line up until
we meet the red “line of best fit.” Now we can follow the second dotted line across to
the y-axis, and land on our prediction — we would predict that George will spend $33
this week.
Where does this red “line of best fit” come from? Well, you may be familiar with the
formula y = mx + b, the formula for a straight line. This is the foundation of linear
regression. All we need to do is reformat a few variables, add an error term (e) to
account for randomness, and fill in our target ($ spent) and features (age).
We’ll train a model to learn the relationship between age and dollars spent this week
from past data points. Our model will determine the values of m1 and b that best
predict the dollars spent this week, given the age. We can easily add in more features,
such as has_kids, and the model will then learn the value of m2 as well.
In the real world, of course, building a straight line like this is usually not realistic, as
we often have more complex, non-linear relationships. We can manipulate our
features manually to deal with this, but that can be cumbersome, and we’ll often miss
out on some more complex relationships. However, the benefit is that it’s quite
straightforward to interpret — with a certain increase in age, we can expect a specific
corresponding increase in dollars spent.
Logistic Regression
Now, rather than trying to predict George’s exact spending, let’s just try to predict
whether or not George will be a high spender. We can use logistic regression, an
adaptation of linear regression for classification problems, to solve this.
The black dots at the top and bottom are the data points we used to train our model,
and the S-shaped line is the line of best fit.
You may have noticed that all data points in the above chart are either a 0 or a 1. This
is because each point is marked as either a low spender (0) or a high spender (1).
Now, we will use a logistic function to generate an S-shaped line of best fit, also
called a Sigmoid curve, to predict the likelihood of a data point belonging to one
category, in this case high spender. We also could have predicted the likelihood of
being a low spender, it doesn’t matter. We’ll then use a predefined threshold to make
a final prediction.
Let’s predict for George again — we’ll find 65 on the x-axis and then map it up to the
S-shaped line and then across. Now, we think there is a 60%chance that George is a
high spender. We’ll now use our threshold, which is indicated by the black dotted line
in the chart above, to decide whether we will predict that he is a high spender or not.
Our threshold is 50%, so since our point is above that line, we’ll predict that George is
a high spender. For this use case, a 50%threshold makes sense, but that’s not always
the case. For example, in the case of credit card fraud, a bank might only want to
predict that a transaction is fraudulent if they’re, say, 95%sure, so they don’t annoy
their customers by frequently declining valid transactions.
Recap
Machine learning is really all about using past data to either make predictions or
understand general groupings in your dataset. Linear models tend to be the simplest
class of algorithms, and work by generating a line of best fit. They’re not always as
accurate as newer algorithm classes, but are still used quite a bit, mostly because
they’re fast to train and fairly straightforward to interpret.
More and more often, analysts and business teams are breaking down the historically
high barrier of entry to AI. Whether you have coding experience or not, you can
expand your machine learning knowledge and learn to build the right model for a
given project.
We hope that you find this high-level overview of machine learning and linear models
helpful. Be on the lookout for future posts from this series discussing other families of
algorithms, including but not limited to tree-based models, neural networks, and
clustering.
Go to Challenge
Overview
The Linear Model is one of the most straightforward models in machine
learning. It is the building block for many complex machine learning
algorithms, including deep neural networks. Linear models predict the target
variable using a linear function of the input features. In this article, we will
cover two crucial linear models in machine learning: linear
regression and logistic regression. Linear regression is used for regression
tasks, whereas logistic regression is a classification algorithm. We will also
discuss some examples of the linear model, which has essential applications
in the industry.
Scope
This article will cover linear models in machine learning.
A brief discussion on linear regression and logistic regression will also
be presented here.
Details on these topics will be covered in the subsequent article.
SEE TABLE
Linear models in machine learning are easy to implement and interpret and
are helpful in solving many real-life use cases.
Linear Regression
Linear Regression is a statistical approach that predicts the result of a
response variable by combining numerous influencing factors. It attempts to
represent the linear connection between features (independent variables) and
the target (dependent variables). The cost function enables us to find the best
possible values for the model parameters. A detailed discussion on linear
regression is presented in a different article.
SEE TABLE
Logistic Regression
SEE TABLE
SEE TABLE
Conclusion
In this article, we have covered linear models in machine learning.
Linear and logistic regression were also discussed in brief here.
Some real-life applications of linear models are also presented here.
A detailed discussion on linear and logistic regression will be presented
in a subsequent article.
supervised learning
What is supervised learning?
Supervised learning is an approach to creating artificial intelligence (AI),
where a computer algorithm is trained on input data that has been labeled for
a particular output. The model is trained until it can detect the underlying
patterns and relationships between the input data and the output labels,
enabling it to yield accurate labeling results when presented with never-
before-seen data.
DOWNLOAD 1
Apart from neural networks, there are many other supervised learning
algorithms (see below). Supervised learning algorithms primarily generate
two kinds of results: classification and regression.
Classification algorithms
A classification algorithm aims to sort inputs into a given number of
categories or classes, based on the labeled data it was trained on.
Classification algorithms can be used for binary classifications such as
filtering email into spam or non-spam and categorizing customer feedback
as positive or negative. Feature recognition, such as recognizing handwritten
letters and numbers or classifying drugs into many different categories, is
another classification problem solved by supervised learning.
Regression models
Regression tasks are different, as they expect the model to produce a
numerical relationship between the input and output data. Examples of
regression models include predicting real estate prices based on zip code, or
predicting click rates in online ads in relation to time of day, or determining
how much customers would be willing to pay for a certain product based on
their age.
linear regression
logistic regression
neural networks
linear discriminant analysis
decision trees
similarity learning
Bayseian logic
support vector machines (SVMs)
random forests
When choosing a supervised learning algorithm, there are a few things that
should be considered. The first is the bias and variance that exist within the
algorithm, as there is a fine line between being flexible enough and too
flexible. Another is the complexity of the model or function that the system
is trying to learn. As noted, the heterogeneity, accuracy, redundancy and
linearity of the data should also be analyzed before choosing an algorithm.
Learn more about supervised learning algorithms and how they are best
applied in this supervised learning primer from Arcitura Education.
Semi-supervised learning
In cases where supervised learning is needed but there is a lack of quality
data, semi-supervised learning may be the appropriate learning method. This
learning model resides between supervised learning and unsupervised; it
accepts data that is partially labeled -- i.e., the majority of the data lacks
labels.
Humans would present the model with various news articles and their
categories and have the model learn what kind of news belongs to each
category. This way, the model becomes capable of recognizing the news
category of any article it looks at based on its previous training experience.
However, humans might also come to the conclusion that classifying news
based on the predetermined categories is not sufficiently informative or
flexible, as some news may talk about climate change technologies or the
workforce problems in an industry. There are billions of news articles out
there, and separating them into 40 or 50 categories may be an
oversimplification. Instead, a better approach would be to find the
similarities between the news articles and group the news accordingly. That
would be looking at news clusters instead, where similar articles would be
grouped together. There are no specific categories anymore.
This is what unsupervised learning achieves: It determines the patterns and
similarities within the data, as opposed to relating it to some external
measurement.
Learn about how semi-supervised learning and the new "one-shot learning"
approach aim to reduce the need for large data sets and human
intervention.
CHAPTER 3
Unsupervised Learning
Unsupervised Machine
Learning: Algorithms, Types
with Example
ByDaniel JohnsonUpdatedJanuary 21, 2023
Baby has not seen this dog earlier. But it recognizes many
features (2 ears, eyes, walking on 4 legs) are like her pet
dog. She identifies the new animal as a dog. This is
unsupervised learning, where you are not taught but you
learn from the data (in this case data about a dog.) Had this
been supervised learning, the family friend would have told
the baby that it’s a dog as shown in the above Unsupervised
Learning example.
Clustering
Clustering
Clustering is an important concept when it comes to
unsupervised learning. It mainly deals with finding a
structure or pattern in a collection of uncategorized data.
Unsupervised Learning Clustering algorithms will process
your data and find natural clusters(groups) if they exist in
the data. You can also modify how many clusters your
algorithms should identify. It allows you to adjust the
granularity of these groups.
Exclusive (partitioning)
In this clustering method, Data are grouped in such a way
that one data can belong to one cluster only.
Example: K-means
Agglomerative
In this clustering technique, every data is a cluster. The
iterative unions between the two nearest clusters reduce the
number of clusters.
Overlapping
In this technique, fuzzy sets is used to cluster data. Each
point may belong to two or more clusters with separate
degrees of membership.
Probabilistic
This technique uses probability distribution to create the
clusters
“man’s shoe.”
“women’s shoe.”
“women’s glove.”
“man’s glove.”
Clustering Types
Following are the clustering types of Machine Learning:
Hierarchical clustering
K-means clustering
K-NN (k nearest neighbors)
Principal Component Analysis
Singular Value Decomposition
Independent Component Analysis
Hierarchical Clustering
Hierarchical clustering is an algorithm which builds a
hierarchy of clusters. It begins with all the data which is
assigned to a cluster of their own. Here, two close cluster
are going to be in the same cluster. This algorithm ends
when there is only one cluster left.
K-means Clustering
K means it is an iterative clustering algorithm which helps
you to find the highest value for every iteration. Initially, the
desired number of clusters are selected. In this clustering
method, you need to cluster the data points into k groups. A
larger k means smaller groups with more granularity in the
same way. A lower k means larger groups with less
granularity.
Agglomerative clustering
Dendrogram
Agglomerative clustering
This type of K-means clustering starts with a fixed number of
clusters. It allocates all data into the exact number of
clusters. This clustering method does not require the
number of clusters K as an input. Agglomeration process
starts by forming each data as a single cluster.
Dendrogram
In the Dendrogram clustering method, each level will
represent a possible cluster. The height of dendrogram
shows the level of similarity between two join clusters. The
closer to the bottom of the process they are more similar
cluster which is finding of the group from dendrogram which
is not natural and mostly subjective.
K- Nearest neighbors
K- nearest neighbour is the simplest of all machine learning
classifiers. It differs from other machine learning techniques,
in that it doesn’t produce a model. It is a simple algorithm
which stores all available cases and classifies new instances
based on a similarity measure.
Association
Association rules allow you to establish associations
amongst data objects inside large databases. This
unsupervised technique is about discovering interesting
relationships between variables in large databases. For
example, people that buy a new home most likely to buy
new furniture.
Other Examples:
Applications of Unsupervised
Machine Learning
Some application of Unsupervised Learning Techniques are:
Disadvantages of Unsupervised
Learning
You cannot get precise information regarding data
sorting, and the output as data used in unsupervised
learning is labeled and not known
Less accuracy of the results is because the input data
is not known and not labeled by people in advance.
This means that the machine requires to do this itself.
The spectral classes do not always correspond to
informational classes.
The user needs to spend time interpreting and label
the classes which follow that classification.
Spectral properties of classes can also change over
time so you can’t have the same class information
while moving from one image to another.
Summary
Unsupervised learning is a machine learning technique,
where you do not need to supervise the model.
Unsupervised machine learning helps you to finds all
kind of unknown patterns in data.
Clustering and Association are two types of
Unsupervised learning.
Four types of clustering methods are 1) Exclusive 2)
Agglomerative 3) Overlapping 4) Probabilistic.
Important clustering types are: 1)Hierarchical
clustering 2) K-means clustering 3) K-NN 4) Principal
Component Analysis 5) Singular Value Decomposition
6) Independent Component Analysis.
Association rules allow you to establish associations
amongst data objects inside large databases.
In Supervised learning, Algorithms are trained using
labelled data while in Unsupervised learning Algorithms
are used against data which is not labelled.
Anomaly detection can discover important data points
in your dataset which is useful for finding fraudulent
transactions.
The biggest drawback of Unsupervised learning is that
you cannot get precise information regarding data
sorting
Pause
Unmute
Duration 18:10
Loaded: 4.77%
Â
Fullscreen
o K-means clustering
o KNN (k-nearest neighbors)
o Hierarchal clustering
o Anomaly detection
o Neural Networks
o Principle Component Analysis
o Independent Component Analysis
o Apriori algorithm
o Singular value decomposition
W3scholl seem
Reinforcement learning
Difficulty Level : Easy
Last Updated : 23 Jan, 2023
· Read
· Discuss
· Courses
· Practice
· Video
Reinforcement learning is an area of Machine Learning. It is about
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 it should take in a specific
situation. Reinforcement learning differs from supervised learning
in a way that in supervised learning the training data has the
answer key with it so the model is trained with the correct answer
itself whereas in reinforcement learning, there is no answer but
the reinforcement agent decides what to do to perform the given
task. In the absence of a training dataset, it is bound to learn
from its experience.
Example: The problem is as follows: We have an agent and a
reward, with many hurdles in between. The agent is supposed to
find the best possible path to reach the reward. The following
problem explains the problem more easily.
The above image shows the robot, diamond, and fire. The goal of
the robot is to get the reward that is the diamond and avoid the
hurdles that are fired. The robot learns by trying all the possible
paths and then choosing the path which gives him the reward
with the least hurdles. Each right step will give the robot a reward
and each wrong step will subtract the reward of the robot. The
total reward will be calculated when it reaches the final reward
that is the diamond.
Main points in Reinforcement learning –
Input: The input should be an initial state from which the
model will start
Output: There are many possible outputs as there are a
variety of solutions to a particular problem
Training: The training is based upon the input, The model will
return a state and the user will decide to reward or punish the
model based on its output.
The model keeps continues to learn.
The best solution is decided based on the maximum reward.
1. Positive –
Positive Reinforcement is defined as when an event, occurs
due to a particular behavior, increases the strength and the
frequency of the behavior. In other words, it has a positive
effect on behavior.
Advantages of reinforcement learning are:
Maximizes Performance
Sustain Change for a long period of time
Too much Reinforcement can lead to an overload of states
which can diminish the results
2. Negative –
Negative Reinforcement is defined as strengthening of
behavior because a negative condition is stopped or avoided.
Advantages of reinforcement learning:
Increases Behavior
Provide defiance to a minimum standard of performance
It Only provides enough to meet up the minimum behavior
PY
Python3
import gym
import numpy as np
# Take the action and observe the new state and reward
next_state, reward, done, _ = env.step(action)
state = next_state
# Test the trained Q-Learning algorithm
state = env.reset()
done = False
while not done:
# Choose an action
action = np.argmax(q_table[state, :])
CHAPTER 4
Artificial Neural Network (ANN)
(Use the Slide and the below URLS)
Beginners Guide to Artificial
Neural Network
Deepanshi — Published On May 25, 2021 and Last Modified On May 31st, 2021
Advanced Deep Learning Maths
Introduction
Table of Content
Download Brochure
Input layer
Hidden layer
Output layer
Source:
Wikipedia
Hidden Layer: Hidden layer is the set of neurons where all the
computations are performed on the input data. There can be
any number of hidden layers in a neural network. The simplest
network consists of a single hidden layer.
Source: Medium
Source:
Xenonstack.com
1.
2.
3.
Each hidden layer consists of neurons. All the inputs are
connected to each neuron.
4.
5.
6.
W1, W2, W3, W4, W5 are the weights assigned to the inputs In 1,
In2, In3, In4, In5, and b is the bias.
1.
2.
1.
2.
If the error is large, then the steps are taken to minimize the
error and for the same purpose, Back Propagation is
performed.
But here are the question is: How the weights are updated and
new weights are calculated?
In the image below, the curve is our cost function curve and our
aim is the minimize the error such that J min i.e global minima is
achieved.
Source: Quora
1.
2.
3.
4.
5.
Then new weights are calculated using the below formula,
where a is the learning rate which is the parameter also
known as step size to control the speed or steps of the
backpropagation. It gives additional control on how fast we
want to move on the curve to reach global minima.
6.
Source:
hmkcode.com
4.This process of calculating the new weights, then errors from the
Definition of an ANN
Neurons
Each of the neurons has its own weights that are used
to weight the features. During the training of the
network, you need to select such weights for each of
the neurons that the output provided by the whole
network would be true-to-life.
Iteration
Epoch
Batch
arctan2(i1−a1)+…
+arctan2(in−an)narctan2(i1−a1)+…
+arctan2(in−an)n
(i1−a1)2+(i2−a2)2+…+
(in−an)2n(i1−a1)2+(i2−a2)2+…+
(in−an)2n
Summary
Table of Contents
You can skip to a specific section of this deep learning tutorial
using the table of contents below:
The Example We'll Be Using In This Tutorial
The Parameters In Our Data Set
The Most Basic Form of a Neural Network
The Purpose of Neurons in the Hidden Layer of a Neural
Network
How Neurons Determine Their Input Values
Visualizing A Neural Net's Prediction Process
Final Thoughts
A Beginner-Friendly Explanation of
How Neural Networks Work
Understanding Neural Network Fundamentals for
Five-Year-Olds
Table of Content
1. Preface
2. Artificial Intelligence, Machine Learning, and
Neural Networks
3. The Mechanics of a Basic Neural Network
4. Types of Neural Networks
5. Neural Network Applications
Preface
Neural Networks
At its roots, a Neural Network is essentially a
network of mathematical equations. It takes one
or more input variables, and by going through a
network of equations, results in one or more output
variables. You can also say that a neural network
takes in a vector of inputs and returns a vector of
outputs, but I won’t get into matrices in this article.
Summary
1.1: Introduction
Depth:
Stride:
Zero-Padding:
Input = output
1. Convolution
2. Pooling
3. Flattening
4. Full Connection
So Flattening is become the input of Artificial Neural
Network which is used for the backpropagation
Method.
Approach
Selection of Image
3.5 Flattening:
In this step, we converting all the resultant 2-
dimensional arrays into a single long continuous
linear vector.
As
91 > 51
So,
The image we input for prediction into our
convolutional neural network is X
Dataset sample:
2.2.1: Train_datagen