Back to AI Glossary
Machine Learning

What is Classification?

Classification is a supervised machine learning task where the model learns to assign input data to predefined categories or classes, such as spam versus legitimate email, fraudulent versus normal transactions, or positive versus negative customer sentiment.

What Is Classification?

Classification is one of the two primary types of supervised machine learning (the other being regression). In a classification task, the model learns to assign inputs to predefined categories or classes. Given a set of features about a data point, the model predicts which category it belongs to.

Examples are everywhere in business:

  • Email filtering -- spam or not spam
  • Fraud detection -- fraudulent or legitimate
  • Customer sentiment -- positive, neutral, or negative
  • Lead qualification -- hot, warm, or cold
  • Medical diagnosis -- condition present or absent

Types of Classification

Binary Classification

The simplest form: two possible classes.

  • Fraud detection: fraudulent vs. legitimate
  • Customer churn: will churn vs. will stay
  • Credit approval: approve vs. reject
  • Email: spam vs. not spam

Multi-Class Classification

More than two possible classes, with each input belonging to exactly one.

  • Customer segmentation: premium, standard, basic, at-risk
  • Document categorization: invoice, contract, receipt, correspondence
  • Product categorization: assigning products to one of dozens or hundreds of categories

Multi-Label Classification

Each input can belong to multiple classes simultaneously.

  • News articles tagged with multiple topics (politics, economy, technology)
  • Products assigned multiple attribute tags (waterproof, lightweight, premium)
  • Customer support tickets categorized by multiple issue types

Common Classification Algorithms

Different algorithms suit different scenarios:

  • Logistic Regression -- Despite the name, this is a classification algorithm. Simple, fast, interpretable. Good baseline for binary classification.
  • Decision Trees -- Intuitive, interpretable, handle mixed data types. Can overfit but form the basis for powerful ensemble methods.
  • Random Forests -- Ensemble of many decision trees. Robust, accurate, handles noisy data well. One of the most reliable general-purpose classifiers.
  • Gradient Boosting (XGBoost, LightGBM) -- Sequential ensemble that builds trees to correct previous errors. Often the top performer on tabular data.
  • Support Vector Machines (SVM) -- Effective for high-dimensional data. Less commonly used today due to scalability limitations.
  • Neural Networks -- Most powerful for complex, unstructured data (images, text). Require more data and compute than other approaches.

Evaluating Classification Models

Accuracy alone can be misleading. Consider a fraud detection system where only 1% of transactions are fraudulent. A model that predicts "not fraud" for every transaction achieves 99% accuracy but catches zero fraud.

Key evaluation metrics include:

  • Precision -- Of all predictions of class X, what percentage was actually class X? High precision means fewer false alarms.
  • Recall (Sensitivity) -- Of all actual class X examples, what percentage did the model catch? High recall means fewer missed detections.
  • F1 Score -- The harmonic mean of precision and recall. Useful when you need to balance both.
  • AUC-ROC -- Measures the model's ability to distinguish between classes across all threshold settings.
  • Confusion Matrix -- A table showing exactly where the model gets things right and wrong for each class.

The right metric depends on the business cost of errors. In fraud detection, missing a fraudulent transaction (low recall) may cost more than flagging a legitimate one (low precision). In medical diagnosis, a false negative could be life-threatening.

Business Applications Across Southeast Asia

Classification powers high-impact applications throughout the ASEAN region:

  • Credit scoring and risk assessment -- Banks and fintech companies in Indonesia, the Philippines, and Vietnam classify loan applicants into risk categories, enabling lending to underbanked populations. Companies like Akulaku, Kredivo, and Atome use classification models to assess risk for millions of users.
  • Customer churn prediction -- Telecom providers and subscription businesses classify customers by churn risk, enabling proactive retention. In markets with intense competition like Thailand and Indonesia, reducing churn by even 5% significantly impacts revenue.
  • Fraud detection -- Digital payment platforms (GrabPay, GoPay, ShopeePay, Dana) classify transactions in real time to catch fraud while minimizing friction for legitimate users.
  • Content moderation -- Social platforms and marketplaces classify user-generated content to detect policy violations, fake listings, and harmful content across multiple languages.
  • Document classification -- Enterprises classify incoming documents (contracts, invoices, permits) for automated routing and processing, especially valuable for organizations handling multilingual documents.

Building a Classification System: Practical Steps

  1. Define the classes clearly -- Ambiguous class definitions lead to poor labeling and poor models
  2. Collect and label training data -- Ensure sufficient examples of each class, especially minority classes
  3. Handle class imbalance -- In many business problems, one class is much rarer than others (e.g., fraud). Techniques include oversampling, undersampling, SMOTE, and adjusting class weights.
  4. Choose the right metric -- Align the evaluation metric with business costs of different types of errors
  5. Set the classification threshold -- Most models output probabilities. Adjusting the threshold trades off precision and recall to match business requirements.
  6. Monitor in production -- Class distributions can shift over time. Monitor performance and retrain as needed.

The Bottom Line

Classification is the most commercially deployed type of machine learning. If your business needs to make categorical decisions at scale -- approve or reject, flag or pass, categorize or route -- classification is your tool. Its mature ecosystem of algorithms, evaluation tools, and deployment patterns makes it an ideal starting point for organizations beginning their ML journey.

Why It Matters for Business

Classification is the backbone of most production ML systems in business today. For CEOs and CTOs, this is the ML capability most likely to deliver measurable ROI in the near term. Every business makes categorical decisions -- approve/reject, buy/sell, priority/routine, high-risk/low-risk -- and classification automates these decisions at scale with consistency and speed that human reviewers cannot match.

The financial impact is well-documented. Automated fraud classification systems typically catch 50-70% more fraudulent transactions than rule-based systems while reducing false positives by 30-50%. Customer churn classification enables targeted retention that reduces attrition by 15-25%. Lead classification improves sales efficiency by 20-40% by focusing effort on high-probability prospects. These numbers translate directly to revenue protection and growth.

For businesses in Southeast Asia, classification addresses several pressing challenges. The region's rapid digital payment adoption creates enormous fraud detection needs. The intense competition in e-commerce and telecommunications makes churn prediction critical. The regulatory environment across ASEAN requires automated compliance classification for KYC, AML, and data protection. Companies that deploy effective classification systems gain operational advantages that compound over time as models improve with more data.

Key Considerations
  • Define class labels carefully with input from business stakeholders -- ambiguous labels produce unreliable models
  • Address class imbalance proactively; in most business problems, the interesting class (fraud, churn, defects) is rare, requiring specialized handling
  • Choose evaluation metrics based on the business cost of errors, not just overall accuracy -- a fraud detection system should prioritize recall over precision
  • Set classification thresholds based on business requirements rather than default values; the optimal threshold depends on the relative cost of false positives versus false negatives
  • Plan for model monitoring in production, especially for class distribution shifts that occur as markets and customer behavior evolve
  • Consider interpretability requirements -- in regulated industries like banking, you may need to explain why a specific classification decision was made
  • Start with gradient boosting (XGBoost or LightGBM) for structured data problems; it consistently delivers top performance with minimal tuning

Frequently Asked Questions

What is the difference between classification and regression?

Classification predicts a category (spam/not spam, high/medium/low risk), while regression predicts a continuous number (revenue amount, temperature, price). If the answer to your prediction question is a label or category, use classification. If it is a number on a continuous scale, use regression. Some problems can be framed either way -- predicting customer satisfaction as a score (1-10) is regression, but predicting it as a category (satisfied/dissatisfied) is classification.

How do I handle imbalanced classes where one category is much rarer than others?

Class imbalance is extremely common in business problems. Strategies include: oversampling the minority class (SMOTE is popular), undersampling the majority class, adjusting class weights in the algorithm to penalize minority class errors more heavily, using evaluation metrics designed for imbalanced data (precision-recall AUC rather than accuracy), and collecting more examples of the minority class. The best approach depends on your specific data and problem.

More Questions

Yes, to varying degrees depending on the algorithm. Decision trees and logistic regression are inherently interpretable -- you can trace exactly which features drove the decision. For more complex models like random forests and gradient boosting, tools like SHAP values and LIME provide post-hoc explanations of individual predictions. For regulated industries in Southeast Asia, especially banking and insurance, model interpretability is often a requirement and should be built into your ML pipeline from the start.

Need help implementing Classification?

Pertama Partners helps businesses across Southeast Asia adopt AI strategically. Let's discuss how classification fits into your AI roadmap.