Professional Documents
Culture Documents
Module-3 Eco-598 ML & Ai
Module-3 Eco-598 ML & Ai
Artificial Intelligence
And
Machine Learning
Prof. Neelapala Anil Kumar,
Department of ECE,
ACED, Alliance University.
Syllabus
Online learning
sequential order, and the best predictor for the future
data is updated at each step, instead of learning on the
entire training dataset at once to get the best
predictor.
Working of Supervised Learning. ( https://www.javatpoint.com/machine-learning
Types of
supervised
Machine learning Algorithms
Regression
Relationship between the input variable and the output variable, prediction
of continuous variables, popular Regression algorithms which come under
supervised learning:
oLinear Regression
oRegression Trees
oNon-Linear Regression
oBayesian Linear Regression
oPolynomial Regression
Classification
Classification algorithms are used when the output variable is categorical,
which means there are two classes such as Yes-No, Male-Female, True-
false, etc.
Spam Filtering,
Random Forest
Decision Trees
Classifications of Supervised Learning. ( https://www.javatpoint.com/machine-learning
Logistic Regression
the dataset
Build a Polynomial Regression model and fit it
o
to the dataset
Visualize the result for Linear Regression and
o
( )
https://www.javatpoint.com/machine-learning
Implementation of Decision Tree
Step-1: Begin the tree with the root node, says S, which
contains the complete dataset. o Data Pre-processing step
Step-2: Find the best attribute in the dataset o Fitting a Decision-Tree algorithm to the
using Attribute Selection Measure (ASM).
Training set
Step-3: Divide the S into subsets that contains possible
values for the best attributes.
o Predicting the test result
Step-4: Generate the decision tree node, which contains the o Test accuracy of the result
best attribute. o Visualizing the test set result.
Step-5: Recursively make new decision trees using the
subsets of the dataset created in step -3. Continue this
process until a stage is reached where you cannot further
classify the nodes and called the final node as a leaf node.
Contd.,
• Cluster K1=?
• Cluster K2=?
• With Mean m1 and m2 at each itteration
Finding cluster from
K-data set
• K1={2,3,4}
• K2={10,11,12,20,25,30}
• Now find the average of k1 and K2 to get the mean of m1 and m2
• K1= 2+3+4/3=3
• K2= 10+11+12+20+25+30/6
• =108/6=18
• New means M1= 3: M2= 18
• Rough work:
• Iniially no centroids are given assume
fro the data points.
• Centroids are 3 and 18
• So k1 and k2 can be
• 10 is the data point which has to
decides with cluster so 10-3= 7(k1)
• 18-10=8(k2) so 7 is less so it has to
placed in cluster k1.
Contd..,
K={2,3,4,10,11,11,12,20,25,30}
K1={2,3,4,10,11,12};
K2{20,25,30}
Perform Average to get New mean values
K1= 2+3+4+10+11+12/6
=42/6
=7
K2= 20+25+30/3
=75/3
=25
hence M1=7: m2= 25
Note: Mean values are same as above so K1 an K2 will be same as above hence
we can stop the iteration.
Result:
K1={2,3,4,10,11,12}
K2={20,25,30}
Final Clusters
Homework to solve
• Getting the dataset
• Representing data into a structure
represent the two-dimensional matrix of
independent variable X. Here each row
corresponds to the data items, and the column
corresponds to the Features.
Standardizing the data
features with high variance are more important
compared to the features with lower variance.
Calculating the Covariance of Z
Take the matrix Z, and will transpose it. After
transpose, we will multiply it by Z. The
output matrix will be the Covariance matrix
of Z.
Cond..,