0% found this document useful (0 votes)
59 views

Lecture 1

Uploaded by

somsonengda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Lecture 1

Uploaded by

somsonengda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

1

2
Wollo University ,Kombolicha Institute of Technology

Department of Software Engineering

Fundamental of Machine Learning

By Ashenafi Workie(MSc.)
KIOT@SE by Ashenafi Workie
Major chapters outlines

1 Chapter 1: Introduction to Machine Learning


2 Chapter 2: Classification based Supervised Learning
3 Chapter 3: Regression based Supervised Learning
4 Chapter 4: Unsupervised Learning
5 Chapter 5: Reinforcement Learning
6 Chapter 6: Advanced Machine Learning

4
Assessment Methods

• Assignments and Lab [15%]


• Quiz and Test [20%]
• Project and presentation [20%]
• Final Exam [45%]

5
What is Machine Learning

6
What is Machine Learning

Machine Learning
Labeled Data algorithm

Training

Prediction

Labeled Data Learned model 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

• Main Requirement: Good generalization

9
AI vs ML vs DL

10
AI vs ML vs DL Cont’d

11
Therefore Machine Learning is

The complexity in traditional computer programming is in the code (programs


that people write). In machine learning, algorithms (programs) are in
principle simple and the complexity (structure) is in the data. Is there a way
that we can automatically learn that structure? That is what is at the heart of
machine learning.

-- 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

Images/video Label: “Motorcycle”


Suggest tags
Image search…

Speech recognition
Music classification
Audio
Speaker identification…

Web search
Text Anti-spam Machine
translation…
16
Model

17
Machine Learning Development process

❖ Generally, the learning path includes: Data Engineering skills

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

A traffic system can measure the delay of


cars, but not know how to decrease it.

35
Types of machine Learning

36
Application of Machine Learning

▪ Some application of ML in Google:


▪ Page ranking (RankBrain)
▪ Spam identification in email
▪ Speech recognition (language recognition)
▪ Software in Cars (Autonomous and self driving cars)
▪ Recommender system
▪ Google voice search
▪ Gmail inbox’s smart replay
▪ Google photos
▪ Google Cloud Vision API
▪ Virtual reality etc…

37
Application of Machine Learning

• Healthcare: Predicting patient diagnostics for doctors to review


• Social Network: Predicting certain match preferences on a dating
website for better compatibility
• Finance: Predicting fraudulent activity on a credit card
• E-commerce: Predicting customer churn
• Biology: Finding patterns in gene mutations that could represent
cancer

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.

• Finance : ML can analyze historical data to understand the demand, supply,


and inventory, then forecasts the future's demand, supply, and inventory.

• Space exploration:space discovery as it is a necessary tool in this data age


• Robotics: provides the body while AI supplies the brain.
• Social networks:helps summarizing the interests and opinions of users
(nodes),

39
Application of Machine Learning

40
Application of Machine Learning

41
Learning path

▪The course can be:


▪More of theoretical :
▪More of practical:
▪Balancing the theory and the application

42
Learning path

▪ Generally, the learning path includes:


▪ Math skills
▪ Programming skills
▪ Data Engineering skills
▪ Machine learning algorithms
▪ Machine learning frameworks

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 )

pip install numpy


❖ https://numpy.org/doc/stable/user/absolute_beginners html

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.

▪ %run filename.ipynb: execute code from another notebook or


python file.

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

You might also like