AIML - Practical No.01
AIML - Practical No.01
Objectives:
THEORY:
Machine Learning:
o It is primarily concerned with the design and development of algorithms that allow the
system to learn from historical data.
o Machine Learning is based on the idea that machines can learn from past data, identify
patterns, and make decisions using algorithms.
o Machine learning algorithms are designed in such a way that they can learn and
improve their performance automatically.
o Machine learning helps in discovering patterns in data.
Types of Machine Learning
1. Supervised learning:
Supervised learning, as the name indicates, has the presence of a supervisor as a teacher.
Basically supervised learning is when we teach or train the machine using data that is well
labeled. Which means some data is already tagged with the correct answer. After that, the
machine is provided with a new set of example (data) so that the supervised learning algorithm
analyses the training data(set of training examples) and produces a correct outcome from
labeled data.
For instance, suppose you are given a basket filled with different kinds of fruits. Now the first
step is to train the machine with all different fruits one by one like this:
Since the machine has already learned the things from previous data and this time has to use it
wisely. It will first classify the fruit with its shape and color and would confirm the fruit name
as BANANA and put it in the Banana category. Thus the machine learns the things from
training data (basket containing fruits) and then applies the knowledge to test data(new fruit).
Types:-
Regression
Logistic Regression
Classification
Naive Bayes Classifiers
K-NN (k nearest neighbors)
Decision Trees
Support Vector Machine
Advantages:-
Supervised learning allows collecting data and produces data output from previous
experiences.
Helps to optimize performance criteria with the help of experience.
Supervised machine learning helps to solve various types of real-world computation
problems.
Disadvantages:-
Classifying big data can be challenging.
Training for supervised learning needs a lot of computation time. So, it requires a lot of
time.
2. Unsupervised learning
Unsupervised learning is the training of a machine using information that is neither classified
nor labeled and allowing the algorithm to act on that information without guidance. Here the
task of the machine is to group unsorted information according to similarities, patterns, and
differences without any prior training of data.
Unlike supervised learning, no teacher is provided that means no training will be given to the
machine. Therefore the machine is restricted to find the hidden structure in unlabeled data by
itself.
For instance, suppose it is given an image having both dogs and cats which it has never seen.
Thus the machine has no idea about the features of dogs and cats so we can’t categorize it as
‘dogs and cats ‘. But it can categorize them according to their similarities, patterns, and
differences, i.e., we can easily categorize the above picture into two parts. The first may
contain all pics having dogs in them and the second part may contain all pics having cats in
them. Here you didn’t learn anything before, which means no training data or examples.
It allows the model to work on its own to discover patterns and information that was
previously undetected. It mainly deals with unlabelled data.
Unsupervised learning is classified into two categories of algorithms:
Clustering: A clustering problem is where you want to discover the inherent groupings
in the data, such as grouping customers by purchasing behavior.
Association: An association rule learning problem is where you want to discover rules
that describe large portions of your data, such as people that buy X also tend to buy Y.
Clustering
1. Exclusive (partitioning)
2. Agglomerative
3. Overlapping
4. Probabilistic
Clustering Types:-
1. Hierarchical clustering
2. K-means clustering
3. Principal Component Analysis
4. Singular Value Decomposition
5. Independent Component Analysis
Supervised learning algorithms are trained Unsupervised learning algorithms are trained using
using labeled data. unlabeled data.
Supervised learning model takes direct Unsupervised learning model does not take any
feedback to check if it is predicting correct feedback.
output or not.
Supervised learning model predicts the Unsupervised learning model finds the hidden
output. patterns in data.
In supervised learning, input data is In unsupervised learning, only input data is
provided to the model along with the provided to the model.
output.
The goal of supervised learning is to train The goal of unsupervised learning is to find the
the model so that it can predict the output hidden patterns and useful insights from the
when it is given new data. unknown dataset.
Supervised learning needs supervision to Unsupervised learning does not need any
train the model. supervision to train the model.
Supervised learning can be used for those Unsupervised learning can be used for those cases
cases where we know the input as well as where we have only input data and no
corresponding outputs. corresponding output data.
Supervised learning model produces an Unsupervised learning model may give less
accurate result. accurate result as compared to supervised learning.
Supervised learning is not close to true Unsupervised learning is more close to the true
Artificial intelligence as in this, we first Artificial Intelligence as it learns similarly as a
train the model for each data, and then only child learns daily routine things by his experiences.
it can predict the correct output.
3. Reinforcement Learning:
In this technique, the model keeps on increasing its performance using Reward Feedback to
learn the behavior or pattern. These algorithms are specific to a particular problem e.g. Google
Self Driving car, AlphaGo where a bot competes with humans and even itself to getting better
and better performers of Go Game. Each time we feed in data, they learn and add the data to its
knowledge that is training data. So, the more it learns the better it gets trained and hence
experienced.
Agents observe input.
An agent performs an action by making some decisions.
After its performance, an agent receives a reward and accordingly reinforces and the
model stores in state-action pair of information.
Temporal Difference (TD)
Q-Learning
Deep Adversarial Networks
Types of Reinforcement:
Maximizes Performance
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
Conclusion:______________________________________________________
________________________________________________________________
________________________________________________________________
_____________________________________________________________
******
Oral Questions: