Lecture 1
Lecture 1
2
Wollo University ,Kombolicha Institute of Technology
By Ashenafi Workie(MSc.)
KIOT@SE by Ashenafi Workie
Major chapters outlines
4
Assessment Methods
5
What is Machine Learning
6
What is Machine Learning
Machine Learning
Labeled Data algorithm
Training
Prediction
7
Machine Learning in detail
• ML is a branch of artificial intelligence:
• Uses computing based systems to make sense out of data
• Extracting patterns, fitting data to functions, classifying data, etc
• ML systems can learn and improve
• With historical data, time and experience
• Bridges theoretical computer science and real noise data.
8
Machine Learning in detail
• Receive a collection of observations associated with some action label
• Perform some kind of “Machine Learning”
to be able to:
• Receive a new observation
• “Process” it and generate an action label that is based on previous observations
9
AI vs ML vs DL
10
AI vs ML vs DL Cont’d
11
Therefore Machine Learning is
-- Andrew Ng
12
Machine Learning Vs Traditional programming
Traditional Programming
Data Output
Program
Machine Learning
Data Program
Output
13
Machine Learning Vs Traditional programming
14
Data
▪
15
Data can be
Speech recognition
Music classification
Audio
Speaker identification…
Web search
Text Anti-spam Machine
translation…
16
Model
17
Machine Learning Development process
18
Types of machine Learning
19
Supervised Learning
▪
▪
▪
20
Supervised Learning
❖
Input 1 2 3 4 5 6 9
Output 1 4 9 16 25 36 ?
❖
❖
❖
21
Supervised Learning
❖
❖
❖
❖
❖
22
Supervised Learning
23
Supervised Learning
24
Supervised Learning
25
Types of Supervised Learning
26
Types of Supervised Learning
There are various types of Supervised Machine Learning
Algorithms such as
• Linear Regression,
• Logistic Regression,
• Support Vector Machine (SVM),
• Multi-class Classification, and
• Decision tree.
27
Unsupervised Learning
❖Unsupervised learning :
❖Unsupervised (concise description) [cluster scores well]
❖The aim of unsupervised learning is to find clusters of
similar inputs in the data without being explicitly told that some data
points belong to one class and the other in other classes.
❖The algorithm has to discover this similarity by itself.
❖Discover a good internal representation of the input.
28
Unsupervised Learning
29
Unsupervised Learning
30
Unsupervised Learning
The type of unsupervised learning algorithms include:
•Hierarchical clustering.
•K-means clustering.
•Principal Component Analysis.
•Singular Value Decomposition.
•Independent Component Analysis.
31
Supervised vs unsupervised Learning
32
Reinforcement Learning Learning
❖Reinforcement learning :
❖Reinforcement (stimulus/state, action, reward) [behavior scores well]
– reward maximization.
❖The algorithm searches over the state space of possible inputs and
outputs in order to maximize a reward.
❖Learn to select an action to maximize payoff.
33
Reinforcement Learning Learning
34
Reinforcement Learning Learning
35
Types of machine Learning
36
Application of Machine Learning
37
Application of Machine Learning
38
Application of Machine Learning
• Web search :to rank webpages, videos, and other content in search results
• Computational biology:discover hidden non-obvious patterns in a dataset.
39
Application of Machine Learning
40
Application of Machine Learning
41
Learning path
42
Learning path
43
Python Programming
▪ Python: PL (python tutorial)
▪ Ipython: an advanced python shell. (Anaconda - Jupyter)
▪ Numpy: to manipulate number data (Number python)
▪ Scipy: high-level scientific computation (Scientific Python),
optimization, regression, interpolation.
▪ Matplotlib: 2-D visualization, “publication-ready” plots.
▪ Scikit-learn: the ML algorithms in python.
44
Tool set
▪ Jupyter notebooks
▪ Interactive coding and Visualization of output
▪ NumPy, SciPy, Pandas
▪ Numerical computation
▪ Matplotlib, Seaborn
▪ Data visualization
▪ Scikit-learn
▪ Machine learning
45
Installl packages(pip install packagesname)
46
Installl packages(conda install packagesname)
47
Numpy(pip install numpy or conda install numpy )
48
Numpy
pip install numpy or conda install
❖Numpy
49
Numpy
50
Matiplotlib(pip install matiplotlib or conda install matiplotlib )
❖Matplotlib
pip install matplotlib or conda matplotlib
51
Matiplotlib
❖Matplotlib
52
Matiplotlib
❖Matplotlib
53
Matiplotlib
❖Matplotlib
54
Matiplotlib
❖Matplotlib
55
SciPy (pip install scipy or conda install scipy )
❖SciPy
56
Jupyter cell
▪ %matplotlib inline: display plots inline in Jupyter notebook.
57
Jupyter cell
▪ %%timeit: time how long a cell takes to execute.
58
Pandas (pip install pandas or conda install pandas )
❖Library for computation with tabular data.
❖Mixed types of data allowed in a single table.
❖Columns and rows of data can be named.
❖Advanced data aggregation and statistical functions.
59
Image (pip install opencv-python )
60
Image (pip install opencv-python )
The steps to read and display an image in OpenCV are:
1. Read an image using imread() function.
2. Create a GUI window and display image using imshow() function.
3. Use function waitkey(0) to hold the image window on the screen by the
specified number of seconds, o means till the user closes it, it will hold GUI
window on the screen.
4. Delete image window from the memory after displaying using
destroyAllWindows() function.
61
Image (pip install opencv-python )
62
Image (pip install opencv-python )
1.The image should be in the working directory or a full path of
image should be given.
2.By default, OpenCV stores colored images in BGR(Blue Green and
Red) format.
63
Image (pip install opencv-python )
64
End ….
65