Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
3
05/03/2020
Artificial Intelligence
• “Thestudy of the modelling of human mental
functions by computer programs.”
•2 words Artificial and intelligence
• created by humans is artificial
• Intelligence
means ability to understand,
reason, plan etc.
7
AI, defined it as “
05/03/2020
the science and engineering of making intelligent
machines
.” John McCarthy
The subsets
confused…..
A computer system able to
perform tasks that normally
require human intelligence,
such as visual perception,
speech recognition, decision-
8
05/03/2020
Differences
• AI can be a pile of if-then statements, or a complex statistical model
mapping raw sensory data to symbolic categories.
• The if-then statements are simply rules explicitly programmed by a
human hand.
• statements are sometimes called
rules engines, expert systems, knowledge graphs or symbolic AI.
Collectively, these are known as Good, Old-Fashioned AI (GOFAI).
• But many don’t consider this as complete AI as it is programmed what
to be done.
9
Rijo Jackson Tom 05/03/2020
10
05/03/2020
Machine Learning: Programs
That Alter Themselves
• Machine learning is a subset of AI.
• That is, all machine learning counts as AI, but not all AI counts as
machine learning.
• symbolic logic – rules engines, expert systems and knowledge graphs
– could all be described as AI, and none of them are machine learning.
11
05/03/2020
• “Machine learning is the science
of getting computers to act
without being explicitly
programmed.”
• It’s a subset of AI which uses
statistical methods to enable
machines to improve with
experience.
Machine
Learning
14
05/03/2020
Why this ML hype now?
A computer program
E- less data is said to learn from
T- more data experience E with
Hardware respect to some
power class of tasks T and
performance
measure P if its
performance at tasks
in T, as measured by
P, improves with
experience E. –
Tom Mitchell
[PERCE
NTAGE]
[PERCE
NTAGE] [PERC
25
Machine Learning
Implementation
Tools for implementing machine learning
05/03/2020
Ways to implement ML
• WEKA machine learning workbench (open source)
•R platform
27
05/03/2020
Python for Machine Learning
• Popular
general purpose programming
language
• From
basic level programming to
production level
• Special packages
Numerical and statistics – numpy
28
05/03/2020
Jupyter Notebooks
• Anaconda python installation package
• Jupyter notebooks
Cell based execution
• Spyder-
Scientific Python Development
environment
• Anaconda
has other data visualization and
29
05/03/2020
Rijo Jackson Tom
https://scikit-learn.org/stable/ 30
Rijo Jackson Tom 05/03/2020
31
Thank you!
Until next time
Regression
Supervised Learning – Simple Linear Regression, Polynomial
Regression
05/03/2020
Supervised machine learning
• Setof labeled examples to learn from: training
dataset
• Develop model from training data
• Use model to predictions about the new data
• Training data
Set of predictor values – Independent variables
Numerical output value – Dependent variable
34
05/03/2020
Simple Linear Regression
• We will focus on:
One numeric predictor value,
call it x
One numeric output value, call
it y
y= 0.8 x + 2.6
38
05/03/2020
Regression and Correlation
• The
better the function fits the points,
the more correlated x and y are.
• Linear functions only
• Correlation- values track each other
Positive- when one goes up other also goes
up
40
05/03/2020
Calculating Simple linear
Regression
• Coefficient of Determination
R2, r2, “ R squared”
42
05/03/2020
Regression through spreadsheets
• City temperatures (using Cities.csv)
temperature (y) versus latitude (x)
47
Classification
Supervised Learning - K Nearest Neighbours, Decision Tree
05/03/2020
Classification
• Setof feature values numerical or
categorical
• Categorical – labels
• Model formed from features to labels
• Example
49
05/03/2020
Other applications
• Medical Diagnosis
Feature values: age, gender, history, symptom1-
severity, symptom2-severity, test-result1, test-
result2
Label: disease
• Email spam detection
Feature values: sender-domain, length, images, keyword1,
keyword2, …, keywordn
Label: spam or not-spam
50
05/03/2020
K-Nearest Neighbour (KNN)