Sunteți pe pagina 1din 39

NHẬN DẠNG MẪU

(PATTERN RECOGNITION)
TS. TRAN ANH TUAN
WHAT IS PATTERN RECOGNITION ?

Pattern recognition is taking in raw data and applying actions on it based on the features of data. It
is the process of classifying input data into objects or classes based on key features. There are two
classification methods in pattern recognition: supervised and unsupervised classification.
WHAT IS PATTERN RECOGNITION ?

The supervised classification of input data in the pattern recognition method uses supervised
learning algorithms that create classifiers based on training data from different object classes. The
classifier then accepts input data and assigns the appropriate object or class label.
WHAT IS PATTERN RECOGNITION ?

The supervised classification of input data in the pattern recognition method uses supervised
learning algorithms that create classifiers based on training data from different object classes. The
classifier then accepts input data and assigns the appropriate object or class label.

Data Science
WHAT IS PATTERN RECOGNITION ?

The unsupervised classification method works by finding hidden structures in unlabeled data using
segmentation or clustering techniques.
WHAT IS PATTERN RECOGNITION ?

The unsupervised classification method works by finding hidden structures in unlabeled data using
segmentation or clustering techniques.

Data Science
STEPS IN PATTERN RECOGNITION ?

The supervised classification is the main process of pattern recognition. Data Mining Techinques
help to construct useful patterns from the Data
PATTERN RECOGNITION APPLICATION ?
Computer vision
1. Computer aided diagnosis Medical imaging, EEG, EEG signal analysis Designed to assist
physicians, such as: X-ray mammography Highlighting potential tambours on a mammogram
PATTERN RECOGNITION APPLICATION ?
Computer vision
2. Character recognition Automated mail sorting, processing bank checks; Scanner captures an
image of the text; Image is converted into constituent characters
3. Speech recognition Human computer interaction, Universal access; Microphone records acoustic
signal; Speech signal is classified into phonemes and words
PATTERN RECOGNITION APPLICATION ?
Computer vision
4. Safety Face recognition Identifying fingerprints
5. Astronomy Classifying galaxies by shape Astronomical telescope image analysis Automatic
spectroscopy
6. Bioinformatics DNA sequences analysis DNA micro array data analysis[29] Research of heredity
PATTERN RECOGNITION APPLICATION ?

Computer vision
7. Agriculture Output analysis Soil evaluating Extraction mineral characterization in coffee and
sugar
8. Geography Earthquake analysis Rocks classification
9. Engineering Fault diagnosis for vehicle system Recognition of automobile Type Improve the
safety performance of automobile
PATTERN RECOGNITION APPLICATION ?

Data Science
PATTERN RECOGNITION METHODS ?

Bayesian Decision Theory


Discriminant functions
Bayesian Belief Network
PATTERN RECOGNITION METHODS ?
Parametric Models
Principal Component Analysis (PCA) ; Fisher Linear Discriminant (FLD)
Expectation Maximization (EM) ; Hidden Markov Models (HMM)
PATTERN RECOGNITION METHODS ?

NONPARAMETRIC TECHNIQUES
Parzen Windows
kn Nearest Neighbor Estimation
PATTERN RECOGNITION METHODS ?

LINEAR DISCRIMINANT FUNCTIONS


Gradient Descent Procedures
Relaxation Procedures
Minimum Squared-Error Procedures
PATTERN RECOGNITION METHODS ?

SUPPORT VECTOR MACHINE


Linear SVM
Non-linear SVM & Kernel Trick
PATTERN RECOGNITION METHODS ?

NEURAL NETWORK
Multilayer Neural Network
Back-propagation Algorithm
PATTERN RECOGNITION METHODS ?

UNSUPERVISED LEARNING & CLUSTERING


Mixture Density ; Maximum-Likelihood Estimates
k-Means Clustering ; Fuzzy k-Means Clustering
Proximity Measures ; Similarity Measures
Iterative Optimization Algorithms
Hierarchical Clustering (Agglomerative vs. Divisive )
PATTERN RECOGNITION METHODS ?

ENSEMBLE OF CLASSIFIERS
Ensemble of classifiers
Bagging
Boosting
Combining Classifiers
INTRODUCTION: Python
• Python is a very powerful programming language used for many different applications.
• Over time, the huge community around this open source language has created quite a few tools to efficiently work
with Python. In recent years, a number of tools have been built specifically for data science. As a result, analyzing
data with Python has never been easier.
• Python is the most popular language in the Data Science and Machine Learning Market
INTRODUCTION: Python
Some interesting applications of Python
• Create Machine Learning algorithms
• Build neural networks
• Analyze complex data sets
• Build chatbots
• Work on Raspberry Pi Robot
• Manage server-side web applications
• Work on Language Processing
Four super-powers that Python Foundation gives you
• Build your first program using Python libraries
• Master NumPy (Numerical Python) and Pandas
• Clean and manipulate a database on iPython Notebook
• Build your foundation for advanced technologies such as
Data Science Machine Learning and Artificial Intelligence
• Python vs R
Python is a multi-purpose, free and open source
programming language which has become very popular
in data science due to its active community, data mining
and machine learning libraries.
INTRODUCTION: Pycharm
• Many programmers nowadays opt for Python to build software applications with concise, clean, and readable code
base. They can even accelerate custom software application development by taking advantage of a number of
integrated development environments (IDEs) for Python.
• PyCharm is designed by programmers, for programmers, to provide all the tools you need for productive Python
development. PyCharm is one of the most widely used IDEs for Python programming language.
• JetBrains has developed PyCharm as a cross-platform IDE for Python. In addition to supporting versions 2.x and 3.x
of Python, PyCharm is also compatible with Windows, Linux, and macOS.
DEFINITION: Python Programming Package
• Python download link https://www.python.org/downloads/windows/ (Note: Choose correct version 32 or 64 bit
for Window)
• Pycharm download link: https://www.jetbrains.com/pycharm/download/#section=windows
• Python và Pycharm package shared by presenter (if the above links are unreachable):
https://drive.google.com/drive/folders/1WAanI4F9KfARK8R3jHcQ7nMSCCNObcdj?usp=sharing
DEFINITION: Python Programming Package
• Copy Pycharm and Python into one folder “Package Downloads” before installation

• 1. Install Python  2. Install Pycharm


EXAMPLE: Python Tutorial and Standard Library
• Python Tutorial : https://docs.python.org/3.7/tutorial/index.html
• Python Standard Library : https://docs.python.org/3.7/library/index.html
EXAMPLE: Python Tutorial and Standard Library
• Python Tutorial : https://docs.python.org/3.7/tutorial/index.html
• Python Standard Library : https://docs.python.org/3.7/library/index.html
APPLICATIONS : Get Started with Pycharm
• Start > Jetbrains > JetBrains Pycharm Community Edition 2018.2
• Complete Installation : Check do not import settings (if system asks)
APPLICATIONS : Get Started with Pycharm
• Set UI Theme : Darcula (in black) or IntelliJ (in white). (I choose IntelliJ)
• Next to the “Start Using Pycharm”
APPLICATIONS : Get Started with Pycharm
• Choose “Create New Project”
• Find the directory in which you want to create your project. Then create a folder to contain all project files
APPLICATIONS : Get Started with Pycharm
• Input your project folder name and click OK
• Check again the project folder is correct or not ?
• Click “Create”
APPLICATIONS : Get Started with Pycharm
• Explore the project folder “Python Tutorial” we can see the default folder “venv (library root)”
• The venv module provides support for creating lightweight “virtual environments” with their own site directories,
optionally isolated from system site directories. Each virtual environment has its own Python binary (which matches
the version of the binary that was used to create this environment) and can have its own independent set of
installed Python packages in its site directories.
APPLICATIONS : Get Started with Pycharm
Suggestion : we should create some folders for our purposes in the application
• InputData : Folder to store all data
• SourceCode : Folder to contain our source code
• DefinedFunctions : Folder to contain our defined functions
• OutputData : Folder to contain our output results
Right click on the folder “Python Tutotial” and select Directory
• Input the above directories and create one by one
APPLICATIONS : Get Started with Pycharm
Add/Create files into each folders
• Python file (.py) : Right click on folder “Source Code”, choose “New>Python File“ and input file name “Tutorial01”
• Excel File (.csv) :Right click on folder “Data” and choose “Show In Explorer”. Copy CSV file into folder “Data”
APPLICATIONS : Get Started with Pycharm
Pycharm interfaces

Run or Debug
Code Partition

Project Partition

Output Partition
APPLICATIONS : Get Started with Pycharm
Run a welcome script python x=1
• Click the python file “Tutorial01.py” y=1
• Input the following demo script result = x + y
print("Hello Pycharm. This is my first program")
print("x + y = ", result, " and x - y = ", x - y)
print("Thanks")
APPLICATIONS : Get Started with Pycharm
Debug welcome script python
• Click a blank column in the “Tutorial01.py” script (if the red ball appears that means you can debug to that point)
• Click a bug icon on the right conner
• Click the tab “Debug” on the bottom to see the value of each variable in running time
• Click the red rectangle to stop debug. Click the red ball to remove debug point.
APPLICATIONS : Get Started with Pycharm
Install package in script import numpy as np
• Input the following demo script a = np.array([1, 2, 3, 4])
• The error will show “No module named numpy”) print("Hello Pycharm. This is my second program")
• Click on the error we can see a red light icon print("The array a is : ", a)
print("Thanks")
• Click on the red light icon, we can see the suggestion
“install package numpy”. Click on this suggestion and waiting for finish installation
• After finish install package, there is no error and you can run the script
THANK YOU

S-ar putea să vă placă și