SlideShare a Scribd company logo
การตรวจจับสิ+งผิดปรกติด้วย
Machine Learning
Machine Learning Algorithm & Anomaly detection 2021
Machine Learning Algorithm & Anomaly detection 2021
Machine Learning Algorithm & Anomaly detection 2021
Machine Learning Algorithm & Anomaly detection 2021
Machine Learning Algorithm & Anomaly detection 2021
What is Machine Learning?
https://www.seas.upenn.edu/~cis519/fall2017/lectures/01_introduction.pdf
Computer
Computer
Data
Program
Output
Data
Output
Algorithm
Function coin
https://colab.research.google.com/drive/1PnbyXoIWc95vd_CRX9o9wCxOvXLasenG
Agenda
• Part I Machine learning technique
• Introduction to Machine Learning
• Genetic Algorithm
• Monte Calo
• Reinforcement Learning
• Generative Adversarial Networks
• Part II Anomaly Detection technique
• Type of Anomaly
• RNN
• Historical
• DB-SCAN
• Time Shift Detection
• Text Pattern Anomaly Detection
Genetic Algorithm
Charles Darwin
Genetic Algorithm
Genetic Algorithm
Genetic Algorithm
https://colab.research.google.com/drive/11gw_ccZp8hGE09AUHuW4Zg_k3w7jDpmb#scrollTo=mQrx1Xs96kp7
Monte Calo
https://colab.research.google.com/drive/11gw_ccZp8hGE09AUHuW4Zg_k3w7jDpmb#scrollTo=mQrx1Xs96kp7
บริษัทต้องขนส่งอย่างไรเพื5อให้เกิด คชจ. น้อยที5สุด
กําลังการผลิต (Supply)
โรงงานมีนบุรี 4,000 ชิ,น
โรงงานบางปู 9,000 ชิ,น
โรงงานอยุธยา 2,000 ชิ,น
ปริมาณความต้องการของลูกค้า (Demand)
คลังภาคเหนือ 4,000 ชิ,น
คลังภาคตะวันออกเฉียงเหนือ 6,000 ชิ,น
คลังภาคใต้ 2,000 ชิ,น
คลังภาคตะวันออก 3,000 ชิ,น
ปลายทาง (บาทต่อชิ:น)
ภาคเหนือ ภาคตะวันออกเฉียงเหนือ ภาคใต้ ภาคตะวันออก
โรงงานมีนบุรี 70 50 50 10
โรงงานบางปู 90 70 50 20
โรงงานอยุธยา 40 40 60 40
Monte Calo
ปลายทาง (บาทต่อเครื>อง)
ภาคเหนือ ภาคตะวันออกเฉียงเหนือ ภาคใต้ ภาคตะวันออก
โรงงานมีนบุรี 1,000x70 3,000x50 0x50 0x10
โรงงานบางปู 1,000x90 3,000x70 2,000x50 3,000x20
โรงงาน
อยุธยา
2,000x40 0x40 0x60 0x40
รวม 240,000 360,000 100,000 60,000 760,000
Optimize Value
Monte Calo
Optimize Value
https://colab.research.google.com/drive/1YAVi2t3Y9FgAwDpUTB4WpPdVKigBTKX9#scrollTo=Zaqv1cAbu1Dc
Optimization Technique
üDynamic Programming
üMonti Calo
üReinforcement Learning
Reinforcement Learning
Reinforcement Learning
Gym Cartpole with Deep Q-learning
Generative adversarial network
Generative adversarial network
https://realpython.com/generative-adversarial-networks/
Generative adversarial network
https://aihubprojects.com/forensic-sketch-to-image-generator-using-gan/
Generative adversarial network
https://arxiv.org/pdf/1708.05509.pdf
Towards the Automatic Anime Characters Creation
Generative adversarial network
https://arxiv.org/abs/1703.10593
Unpaired Image-to-Image Translation
Generative adversarial network
Face Frontal View Generation
Rui Huang, et al. in their 2017 paper titled “Beyond Face Rotation: Global and Local Perception GAN for
Photorealistic and Identity Preserving Frontal View Synthesis”
Generative adversarial network
DeblurGAN helps object detection. YOLO detections on the blurred image (top), DeblurGAN
restored image (middle) and the sharp ground truth image from the GoPro dataset (bottom)
Super Resolution using SRGANs taken from the paper, “Photo-Realistic
Single Image Super-Resolution Using a Generative Adversarial
Network”
http://speech.ee.ntu.edu.tw/~tlkagk/slide/Tutorial_HYLee_GAN.pdf?fbclid=IwAR1YjXbxfpByLqGSUf370Z3JJeH8sdjBYwSeBIkh9qgOuRnthGXNModXvBU
Generative adversarial network
https://machinelearningmastery.com/how-to-develop-a-generative-adversarial-network-for-a-1-dimensional-function-from-
scratch-in-keras/
https://colab.research.google.com/drive/10FoORr7LLFTbyiFNf9ZOtV90GHijq7NS
Question ?
Anomaly Detection
Type Of Anomaly
Machine Learning Algorithm & Anomaly detection 2021
Anomalies can be broadly categorized as
39
1. Point Anomalies
2. Contextual Anomalies
3. Collective Anomalies
If an individual data instance can be considered as
anomalous with respect to the rest of data, then the instance is
termed as a point anomaly.
Chandola, V., Banerjee, A. & Kumar, V., 2009. Anomaly Detection: A Survey. ACM Computing Surveys, July. 41(3).
Anomalies can be broadly categorized as
40
1. Point Anomalies
2. Contextual Anomalies
3. Collective Anomalies
If a data instance is anomalous in a specific context
(but not otherwise), then it is termed as a
contextual anomaly
Chandola, V., Banerjee, A. & Kumar, V., 2009. Anomaly Detection: A Survey. ACM Computing Surveys, July. 41(3).
Type Of Anomaly
Anomalies can be broadly categorized as
1. Point Anomalies
2. Contextual Anomalies
3. Collective Anomalies
Chandola, V., Banerjee, A. & Kumar, V., 2009. Anomaly Detection: A Survey. ACM Computing Surveys, July. 41(3).
If a collection of related data instances is
anomalous with respect to the entire data set, it
is termed as a collective anomaly
How to Identify Outliers in your Data
43
1. Extreme Value Analysis
2. Proximity Methods
3. Projection Methods
4. Methods Robust to Outliers
https://machinelearningmastery.com/how-to-identify-outliers-in-your-data/
How to Identify Outliers in your Data
1. Extreme Value Analysis
2. Proximity Methods
3. Projection Methods
4. Methods Robust to Outliers
https://machinelearningmastery.com/how-to-identify-outliers-in-your-data/
1. Focus on univariate methods
2. Visualize the data using scatterplots, histograms and
box and whisker plots and look for extreme values
3. Assume a distribution (Gaussian) and look for values
more than 2 or 3 standard deviations from the mean or
1.5 times from the first or third quartile
4. Filter out outliers candidate from training dataset and
assess your models performance
https://en.wikipedia.org/wiki/Multivariate_normal_distribution
How to Identify Outliers in your Data
1. Extreme Value Analysis
2. Proximity Methods
3. Projection Methods
4. Methods Robust to Outliers
https://machinelearningmastery.com/how-to-identify-outliers-in-your-data/
How to Identify Outliers in your Data
1. Extreme Value Analysis
2. Proximity Methods
3. Projection Methods
4. Methods Robust to Outliers
https://machinelearningmastery.com/how-to-identify-outliers-in-your-data/
How to Identify Outliers in your Data
47
1. Extreme Value Analysis
2. Proximity Methods
3. Projection Methods
4. Methods Robust to Outliers
https://machinelearningmastery.com/how-to-identify-outliers-in-your-data/
Anomaly based IDS using Backpropagation Neural Network
https://pdfs.semanticscholar.org/3ac9/37cb50bad238091fba6d1076a78136fe8691.pdf
• Vrushali D. Mane ME (Electronics) JNEC, Aurangabad
• S.N. Pawar Associate Professor JNEC, Aurangabad
• Neural Network detect 98% accuracy
Recurrent neural network (RNN)
Recurrent neural network (GRU)
n=24
Recurrent neural network
(GRU)
Historical
Historical
DB-SCAN
Historical with DB-
Scan
https://en.wikipedia.org/wiki/DBSCAN https://www.mathworks.com/matlabcentral/fileexchange/53842-dbscan
Historical with DB-Scan
Historical with DB-Scan
RNN with DB-Scan
Example
https://colab.research.google.com/drive/192umgmzZBHjZumvhZhbj_R50tMqApLAf
Time Shift Detection
Create new graph with shift to 1 step
Zoom your graph and shift first 3 step
Zoom your graph and shift first 3 step
Zoom your graph and shift first 3 step
Zoom your graph and shift first 3 step
Cosine Similarity
https://www.softnix.co.th/2019/05/29/similarity-
%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B9%80%E0%B8%AB%E0%B8%A1%E0%B8%B7%E0%B8%AD%E0%B8%99%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B9%81%E0%B8%9
Rotate graph next 3 step and compare with cosine similarity
Remark when value lower than threshold
Compare with anomaly detection (left) and correlation values (right)
Text Pattern Anomaly
Detection
Audit log message
Machine Learning Concept
type=USER_START msg=audit(1600272421): user
pid=3401 uid=0 auid=0 ses=140812
msg='op=PAM:session_open acct="root"
exe="/usr/sbin/crond" hostname=? addr=?
terminal=cron res=success'
type=USER_START msg=audit(1600272421): user
pid=3401 uid=0 auid=0 ses=140812
msg='op=PAM:session_open acct="root"
exe="/usr/sbin/.unknow" hostname=? addr=?
terminal=cron res=success'
Yes
No
Challenge
We don’t have many anomaly dataset.
Machine Learning Concept
type=USER_START msg=audit(1600272421): user
pid=3401 uid=0 auid=0 ses=140812
msg='op=PAM:session_open acct="root"
exe="/usr/sbin/crond" hostname=? addr=?
terminal=cron res=success'
Yes
Yes
Yes
type=USER_START msg=audit(1600272421): user
pid=3401 uid=0 auid=0 ses=140812
msg='op=PAM:session_open acct="root"
exe="/usr/sbin/crond" hostname=? addr=?
terminal=cron res=success'
type=USER_START msg=audit(1600272421): user
pid=3401 uid=0 auid=0 ses=140812
msg='op=PAM:session_open acct="root"
exe="/usr/sbin/crond" hostname=? addr=?
terminal=cron res=success'
Hello world Yes
Machine Learning Concept
type=USER_START msg=audit(1600272421): user
pid=3401 uid=0 auid=0 ses=140812
msg='op=PAM:session_open acct="root"
exe="/usr/sbin/crond" hostname=? addr=?
terminal=cron res=success'
type=USER_START msg=audit(1600272421): user
pid=3401 uid=0 auid=0 ses=140812
msg='op=PAM:session_open acct="root"
exe="/usr/sbin/crond" hostname=? addr=?
terminal=cron res=success'
Hello World!!! type=Hello…
Autoencoder
Autoencoders are a specific type of feedforward neural networks
where the input is the same as the output.
https://www.researchgate.net/figure/Autoencoder-architecture_fig1_318204554
Autoencoder
type=USER_START
msg=audit(1600272421):
user pid=3401 uid=0
auid=0 ses=140812
msg='op=PAM:session_op
en acct="root"
exe="/usr/sbin/crond"
hostname=? addr=?
terminal=cron
res=success'
type=USER_START
msg=audit(1600272421):
user pid=3401 uid=0
auid=0 ses=140812
msg='op=PAM:session_op
en acct="root"
exe="/usr/sbin/crond"
hostname=? addr=?
terminal=cron
res=success'
Similarity = 100%
Autoencoder
type=USER_START
msg=audit(1600272421):
user pid=3401 uid=0 auid=0
ses=140812
msg='op=PAM:session_open
acct="root"
exe="/usr/sbin/.unknow"
hostname=? addr=?
terminal=cron
res=success'
type=USER_START
msg=audit(1600272421):
user pid=3401 uid=0 auid=0
ses=140812
msg='op=PAM:session_open
acct="root"
exe="/usr/sbin/?????"
hostname=? addr=?
terminal=cron
res=success'
?
Similarity < 100%
Autoencoder Example
https://github.com/krmonline/LogAnalysisAnomalyDetection/blob/master/AuditLogAnomaly.ipynb
Question?
Machine Learning Algorithm & Anomaly detection 2021

More Related Content

PPTX
Anomaly Detection for Real-World Systems
PPTX
Anomaly Detection and Spark Implementation - Meetup Presentation.pptx
PDF
Anomaly detection
PPTX
Anomaly detection
PDF
Anomaly detection Workshop slides
PPTX
Anomaly Detection - Real World Scenarios, Approaches and Live Implementation
PPTX
Anomaly Detection Technique
PDF
Anomaly Detection
Anomaly Detection for Real-World Systems
Anomaly Detection and Spark Implementation - Meetup Presentation.pptx
Anomaly detection
Anomaly detection
Anomaly detection Workshop slides
Anomaly Detection - Real World Scenarios, Approaches and Live Implementation
Anomaly Detection Technique
Anomaly Detection

What's hot (20)

PPTX
Anomaly detection with machine learning at scale
PPTX
NSL KDD Cup 99 dataset Anomaly Detection using Machine Learning Technique
PDF
An Introduction to Anomaly Detection
PDF
Anomaly detection (Unsupervised Learning) in Machine Learning
PPTX
Anomaly Detection Via PCA
PDF
Navy security contest-bigdataforsecurity
PPTX
Bayesian Autoencoders for anomaly detection in industrial environments
PPTX
Credit Card Fraud Detection - Anomaly Detection
PDF
Anomaly Detection using multidimensional reduction Principal Component Analysis
PDF
CLASSIFIER SELECTION MODELS FOR INTRUSION DETECTION SYSTEM (IDS)
PPTX
Chapter 10 Anomaly Detection
PDF
Artificial Neural Content Techniques for Enhanced Intrusion Detection and Pre...
PPT
PDF
Comparison of Data Mining Techniques used in Anomaly Based IDS
PPTX
I Dunderstn
PPTX
Subverting Machine Learning Detections for fun and profit
PPTX
A review of machine learning based anomaly detection
PDF
M.E Computer Science Biometric System Projects
PDF
Real Time Intrusion Detection System Using Computational Intelligence and Neu...
PPTX
rsec2a-2016-jheaton-morning
Anomaly detection with machine learning at scale
NSL KDD Cup 99 dataset Anomaly Detection using Machine Learning Technique
An Introduction to Anomaly Detection
Anomaly detection (Unsupervised Learning) in Machine Learning
Anomaly Detection Via PCA
Navy security contest-bigdataforsecurity
Bayesian Autoencoders for anomaly detection in industrial environments
Credit Card Fraud Detection - Anomaly Detection
Anomaly Detection using multidimensional reduction Principal Component Analysis
CLASSIFIER SELECTION MODELS FOR INTRUSION DETECTION SYSTEM (IDS)
Chapter 10 Anomaly Detection
Artificial Neural Content Techniques for Enhanced Intrusion Detection and Pre...
Comparison of Data Mining Techniques used in Anomaly Based IDS
I Dunderstn
Subverting Machine Learning Detections for fun and profit
A review of machine learning based anomaly detection
M.E Computer Science Biometric System Projects
Real Time Intrusion Detection System Using Computational Intelligence and Neu...
rsec2a-2016-jheaton-morning
Ad

Similar to Machine Learning Algorithm & Anomaly detection 2021 (20)

PDF
anomalydetection-191104083630.pdf
PDF
Threat Detection in Surveillance Videos
PDF
Project
PPTX
Data mining
PDF
PNN and inversion-B
PDF
[CVPR 2018] Utilizing unlabeled or noisy labeled data (classification, detect...
PDF
01-pengantar.pdf
PDF
Pattern recognition techniques for the emerging feilds in bioinformatics
PDF
A Novel Feature Selection with Annealing For Computer Vision And Big Data Lea...
PDF
Ijricit 01-002 enhanced replica detection in short time for large data sets
PPTX
Outlier Detection in Data Mining An Essential Component of Semiconductor Manu...
PDF
Review on classification based on artificial
PPTX
swatiVCprsentation artificial learning and machine learning.pptx
PDF
63 steven d. brown - 6466929 - system for discovering implicit relationship...
PDF
Anomaly detection using One-Class Neural Networks (OCNN)
PDF
Knowledge Mining Using Intelligent Agents Satchidananda Dehuri
PDF
Adaptive and online one class support vector machine-based outlier detection
PPTX
Data ming wsn
PPTX
self operating maps
PDF
Fault detection of imbalanced data using incremental clustering
anomalydetection-191104083630.pdf
Threat Detection in Surveillance Videos
Project
Data mining
PNN and inversion-B
[CVPR 2018] Utilizing unlabeled or noisy labeled data (classification, detect...
01-pengantar.pdf
Pattern recognition techniques for the emerging feilds in bioinformatics
A Novel Feature Selection with Annealing For Computer Vision And Big Data Lea...
Ijricit 01-002 enhanced replica detection in short time for large data sets
Outlier Detection in Data Mining An Essential Component of Semiconductor Manu...
Review on classification based on artificial
swatiVCprsentation artificial learning and machine learning.pptx
63 steven d. brown - 6466929 - system for discovering implicit relationship...
Anomaly detection using One-Class Neural Networks (OCNN)
Knowledge Mining Using Intelligent Agents Satchidananda Dehuri
Adaptive and online one class support vector machine-based outlier detection
Data ming wsn
self operating maps
Fault detection of imbalanced data using incremental clustering
Ad

More from Chakrit Phain (20)

PDF
LLM_PairProgramming.pdf
PPTX
Web scraping with php
PPTX
ChatGPT_Prompts.pptx
PDF
Sentence-BERT
PDF
AI_ML_Softnix.pdf
PPTX
Web Scraping with Python
PPTX
เปรียบเทียบ RPA Opensource
PPTX
PHP Bandwidth Shaping script
PPTX
PHP Explode & Preg_split Test
PPTX
Types of Big Data Analytics
PDF
Genetic Algorithm
PDF
Text classification With Rapid Miner
PPTX
Ai optimization Example
PPTX
Zabbix aws
PPTX
Softnix Anomaly Detection Methods
PDF
Neo4j Graph Database และการประยุกตร์ใช้
PDF
Softnix how ml_work_0.1draft
PPTX
Shell Shock
PPTX
Neo4j introduction
PPTX
Hierarchical clustering
LLM_PairProgramming.pdf
Web scraping with php
ChatGPT_Prompts.pptx
Sentence-BERT
AI_ML_Softnix.pdf
Web Scraping with Python
เปรียบเทียบ RPA Opensource
PHP Bandwidth Shaping script
PHP Explode & Preg_split Test
Types of Big Data Analytics
Genetic Algorithm
Text classification With Rapid Miner
Ai optimization Example
Zabbix aws
Softnix Anomaly Detection Methods
Neo4j Graph Database และการประยุกตร์ใช้
Softnix how ml_work_0.1draft
Shell Shock
Neo4j introduction
Hierarchical clustering

Recently uploaded (20)

PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
English Language Teaching from Post-.pdf
PPTX
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
PDF
Pre independence Education in Inndia.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Cardiovascular Pharmacology for pharmacy students.pptx
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
PSYCHOLOGY IN EDUCATION.pdf ( nice pdf ...)
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Module 3: Health Systems Tutorial Slides S2 2025
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Electrolyte Disturbances and Fluid Management A clinical and physiological ap...
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
From loneliness to social connection charting
PPTX
How to Manage Starshipit in Odoo 18 - Odoo Slides
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
human mycosis Human fungal infections are called human mycosis..pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
English Language Teaching from Post-.pdf
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
Pre independence Education in Inndia.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Cardiovascular Pharmacology for pharmacy students.pptx
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
PSYCHOLOGY IN EDUCATION.pdf ( nice pdf ...)
STATICS OF THE RIGID BODIES Hibbelers.pdf
Module 3: Health Systems Tutorial Slides S2 2025
O5-L3 Freight Transport Ops (International) V1.pdf
Electrolyte Disturbances and Fluid Management A clinical and physiological ap...
Pharmacology of Heart Failure /Pharmacotherapy of CHF
From loneliness to social connection charting
How to Manage Starshipit in Odoo 18 - Odoo Slides

Machine Learning Algorithm & Anomaly detection 2021