Unit 1
Unit 1
Machine learning
Machine learning is programming computers to optimize a performance
criterion using example data or past experience. We have a model
defined up to some parameters, and learning is the execution of a
computer program to optimize the parameters of the model using the
training data or past experience. The model may be predictive to make
predictions in the future, or descriptive to gain knowledge from data, or
both.
Supervised learning
Unsupervised learning
Correct responses are not provided, but instead the algorithm tries to
identify similarities between the inputs so that inputs that have
something in common are categorised together. The statistical
approach to unsupervised learning is known as density estimation.
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
exploratory data analysis to find hidden patterns.
Reinforcement learning
Classification
Logistic Regression
K-Nearest Neighbours
Support Vector Machines
Kernel SVM
Naïve Bayes
Decision Tree Classification
Random Forest Classification
Regression
Types of Regression
Linear Regression
Logistic Regression
Linear Regression
Y=MX+C
Here,
Y= Dependent Variable (Target Variable)
X= Independent Variable (predictor Variable)
M and C are the linear coefficients
The values for x and y variables are training datasets for Linear
Regression model representation.
Linear regression can be further divided into two types of the algorithm:
Decision Tree
Introduction Decision Trees are a type of Supervised Machine Learning
(that is you explain what the input is and what the corresponding output
is in the training data) where the data is continuously split according to a
certain parameter. The tree can be explained by two entities, namely
decision
nodes and leaves. The leaves are the decisions or the final outcomes.
And the decision nodes are where the data is split.
Example: SVM can be understood with the example that we have used in
the KNN classifier. Suppose we see a strange cat that also has some
features of dogs, so if we want a model that can accurately identify
whether it is a cat or dog, so such a model can be created by using the
SVM algorithm.
We willfirst train our model with lots of images of cats and dogs so that
it can learn about different features of cats and dogs, and then we test it
with this strange creature. So as support vector creates a decision
boundary between these two data (cat and dog) and choose extreme
cases (support vectors), it will see the extreme case of cat and dog. On
the basis of the support vectors, it will classify it as a cat. Consider the
below diagram:
SVM algorithm can be used for Face detection, image classification, text
categorization, etc.
Linear SVM: Linear SVM is used for linearly separable data, which
means if a dataset can be classified into two classes by using a
single straight line, then such data is termed as linearly separable
data, and classifier is used called as Linear SVM classifier.
Linear SVM:
Non-Linear SVM:
So now, SVM will divide the datasets into classes in the following way.
Consider the below image:
Since we are in 3-d Space, hence it is looking like a plane parallel to the x
-axis. If we convert it in 2d space with z=1, then it will become as: