Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Artificial Intelligence
Vinay V Panicker
vinay@nitc.ac.in
Contact me 9447597959
Course Outcomes:
• J.F. Hair, W.C. Black, B. J. Babin, and R.E. Anderson, Multivariate Data
Analysis. 7thEdn. Pearson New International, 2015.
• U. D. Kumar, Business Analytics – The science of data-driven decision making.
1st Edn. India: Wiley, 2017.
• M. Pradhan, and U.D. Kumar, Machine Learning using Python. 1st Edn. India:
Wiley, 2019.
• A. Srinivasaraghavan and V. Joseph, Machine Learning. 1st Edn. India: Wiley,
2019.
Module 1 Topics
Era of Intelligent Systems - The Fourth Industrial Revolution Impact, The Technology of
the Fourth Industrial Revolution,
Introduction to Artificial Intelligence and Cognition.
Application of artificial intelligence (AI) techniques: Meta-heuristics:
Genetic Algorithm,
Scatter Search,
Tabu Search,
Particle Swarm Intelligence,
Ant Colony Optimization;
Artificial Neural Networks; Fuzzy Logic Systems;
Case based reasoning.
Evaluation Policy
Marks Remarks
distribution
Midterm/Interim Test 20% Portions will be informed in the class
Practice sessions and Tutorials (25%)
Assignments / Tutorials/
30% Course project (50%)
Course Project/ Quizzes
Moodle Quiz(zes) (25%)
End Exam 50%
• Coding Exam 10
• Written Exam 40
Minimum mark required to get a pass grade will be 40 marks out of 100
Practice Sessions and Tutorials
• “In God we trust, all others must bring data.” – W. Edwards Deming
Engineering Mathematics
and Statistics
Definitions of Machine Learning
Statistics
Descriptive Inferential
Statistics Statistics
Journey from Statistics to ML
Business
Analytics
• Y - Dependent/response/target/outcome variable
• X - Independent/predictor variable
Statistics and machine learning are like distant
cousins
o Both machine learning and
• They’re related, sure. But their parents
statistics share the same are different.
goal: Learning from data. Machine learning is a subfield of
o Both these methods focus on computer science and artificial
drawing knowledge or insights intelligence.
from the data. It deals with building systems that can
learn from data, instead of explicitly
o Methods are different. programmed instructions.
A statistical model, on the other hand,
is a subfield of mathematics
Introduction to Algorithms in Machine Learning
ML Algorithms
Target Variable Target Variable Target Variable Target Variable Target Variable
Categorical Continuous not available Categorical not available
TP FN Actual Yes TP FN
Actual No FP TN
Performance Measures
Specificity: Among the actual nos, what fraction was predicted as no?
Also equivalent to 1- false positive rate:
TN
TN FP
F1 score (F1): This is the harmonic mean of the precision and recall.
Multiplying the constant of 2 scales the score to 1 when both precision and
recall are 1:
2
F1
1 1
P R
Performance Measures
• Area under curve (ROC): Receiver Operating
Characteristic curve is used to plot between true positive
rate (TPR) and false positive rate (FPR), also known as a
sensitivity and 1- specificity graph
Performance Measures
• R-squared (coefficient of determination):
• Measure of the percentage of the response variable variation that is
explained by a model. It also a measure of how well the model minimizes
error compared with just utilizing the mean as an estimate.
Measures of Variation
Y
Yi
SSE = (Yi - Yi )2 Y
_
SST = (Yi - Y)2
_2
Y
SSR = (Yi - Y)
_ _
Y Y
Xi X
FDP_NITC_May 2015 49
Coefficient of Determination, r2
FDP_NITC_May 2015 51
Adjusted R-squared
n k 1
n=sample size, k=number of predictors (or variables)
x
Scatter Diagram
• A Negative Relationship
y
x
Scatter Diagram
• No Apparent Relationship
y
x
Example: Panthers Football Team
• Scatter Diagram
The Panthers football team is interested in investigating the
relationship, if any, between interceptions made and points
scored.
x = Number of y = Number of
Interceptions Points Scored
1 14
3 24
2 18
1 17
3 27
Example: Panthers Football Team
• Scatter Diagram
y
• Covariance
• Correlation Coefficient
Covariance
( xi x )( yi y )
sxy
n 1
( xi x )( yi y )
xy
N
Example
Week Number of Sales volume
commercials (x) (y)
1 2 50
2 5 57
3 1 41
4 3 54
5 4 54
6 1 38
7 5 63
8 3 48
9 4 59
10 2 46
Scatter Diagram
70
60
40
30
20
10
0
0 1 2 3 4 5 6
Number of commercials
Calculations for sample covariance
(x) (y) ( x x ) ( y y )
i i ( xi x )( yi y )
2 50 -1 -1 1
5 57 2 6 12
1 41 -2 -10 20
3 54 0 3 0
4 54 1 3 3
1 38 -2 -13 26
5 63 2 12 24
3 48 0 -3 0
4 59 1 8 8
2 46 -1 -5 5
Calculations for sample covariance
s xy
( x x )( y y )
i i
99
11
n 1 10 1
Scatter Diagram
70
60
40
30
20
10
0
0 1 2 3 4 5 6
Number of commercials
Correlation Coefficient
• The coefficient can take on values between -1 and +1.
• Values near -1 indicate a strong negative linear
relationship.
• Values near +1 indicate a strong positive linear
relationship.
• If the data sets are samples, the coefficient is rxy.
sxy
rxy
sx s y
1 2 50 -1 -1 1 1 1
2 5 57 2 6 4 36 12
3 1 41 -2 -10 4 100 20
4 3 54 0 3 0 9 0
5 4 54 1 3 1 9 3
6 1 38 -2 -13 4 169 26
7 5 63 2 12 4 144 24
8 3 48 0 -3 0 9 0
9 4 59 1 8 1 64 8
10 2 46 -1 -5 1 25 5
3 51 0 0 20 566 99
r= 0.930