DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. Fundamentals of Anomaly Detection

Fundamentals of Anomaly Detection

Let's take a look at the fundamentals of anomaly detection and also explore the categories of anomalies and anomaly detection techniques.

Sibanjan Das user avatar by
Sibanjan Das
CORE ·
Oct. 24, 18 · Tutorial
Like (14)
Save
Tweet
Share
9.22K Views

Join the DZone community and get the full member experience.

Join For Free

Today, when we claim of solving problems with Data Science, we try to do one of the following things:

Image title

  • Getting out the predictions — This is a golden term in today's world and what most people consider when anyone quotes "Data Science" or "Machine Learning."

  • Generating Recommendation — It is the art of suggesting "something" to people. The use cases are like recommending products as we notice in Amazon, suggesting movies as in Netflix or recommending articles to readers.

  • Producing Insights — Another serviceable area of Data Science where it serves to uncover relationships and patterns in the data that are not so visible to the wide eyes.

  • Detecting Anomalies — It is the method to find out scenarios that are unexpected and are rare events. With the rising demand of connected systems, better security monitoring for smart cities, Server monitoring and agile fraud detections, it has become imperative to detect the anomalies as and when they occur.

In a series of articles, we will understand the different methods for detecting anomalies along with hands-on exercises using R or Python, so that anomaly detection techniques don't appear as an anomaly to us. 

So, let's start with a very basic question — What's Anomaly? 

As dicitionary.com defines, it is:

  1. A deviation from the common rule, type, arrangement, or form.

  1. An anomalous person or thing; one that is abnormal or does not fit in
  2. An odd, peculiar, or strange condition, situation, quality, etc.

Imagine I give you the following list:

  • Keyboard

  • Mouse

  • Hard disk

  • Television

We can quickly identify the first three as parts of a computer, and television doesn't go well with the list of items. It is an anomaly in the list.

In short, an anomaly is deviating from or inconsistent with the common order, form, or rule, and which does not conform to the usual behavior of the data. For example, let's say we work in a steel manufacturing industry, and we see the quality of the steel suddenly drops down below the permissible limits. This is an anomaly; if not detected and resolved soon will cost the organization millions. So to detect an abnormality at an early stage of its occurrence is very crucial.

Categories of Anomalies

Generally, anomalies can be defined into three buckets:

1) Point Anomalies — An individual data unit deviates from the rest available data points. For example, a high credit card transaction amount compared to other available transaction done the user.

2) Contextual Anomalies — Point anomaly detected within a context. It is also known as a conditional anomaly as we define whether a point is unusual or not based on certain conditions. For example, a high transaction of 10,000 dollars during Christmas in a retail store can be considered normal while this transaction during an offseason might be flagged as an anomaly

3) Collective Anomalies — Here a group of different attributes or data points collectively indicates an anomaly. For example, in a smart car, if it's speed drops suddenly, the brake is applied, and the windshield is broken, then collectively we can infer that there is an accident which is an anomaly.

Gone are the days when detecting anomalies were considered a simple task. It is very challenging now, when we deal with data that moves fast, grows faster, and changes frequently. The other aspect that makes it challenging is the agility of detecting anomalies when it occurs. It should adapt to the rapidly evolving metric's baseline. Broadly, there are two types of anomaly detection techniques that can be used separately or used together to create a robust anomaly detection engine.

Type of Anomaly Detection Techniques

Image title

Rule-based systems are usually designed by defining rules that describe an anomaly and assigning thresholds and limits. For example, anything above the threshold or below is classified as an anomaly. Rule-based systems are designed from the experience of the industry experts and can be thought of as systems that are designed to detect “known anomalies.” They are "known anomalies" because we recognize what is usual and what is not usual.

However, if there is something that is not known and has never been discovered so far, then creating rules for detecting anomalies is difficult. In such cases, machine learning-based detection systems come in handy. They are a bit complicated but can deal with many uncertain situations. Mostly, they can deduce the patterns that are unusual and alert the users.

In the next piece of this series, we the various techniques of Machine Learning based anomaly detection methods.

Anomaly detection Data science Machine learning Drops (app) Form (document) Cards (iOS) Exercise (mathematics)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Reliability Is Slowing You Down
  • When Should We Move to Microservices?
  • How We Solved an OOM Issue in TiDB with GOMEMLIMIT
  • Choosing the Right Framework for Your Project

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: