Back to AI Glossary
Machine Learning

What is Feature Engineering?

Feature Engineering is the process of selecting, transforming, and creating the input variables that a machine learning model uses to make predictions, directly determining model performance and often representing the most impactful step in any ML project.

What Is Feature Engineering?

Feature Engineering is the process of using domain knowledge to create, select, and transform the input variables (features) that a machine learning model uses to make predictions. A feature is any measurable property of the data -- for example, a customer's age, their total purchase amount last month, or the number of days since their last login.

The quality and relevance of your features often have a greater impact on model performance than the choice of algorithm. As the saying goes in the ML community: "Applied machine learning is basically feature engineering."

Why Feature Engineering Matters

Raw data is rarely in the right format for an ML model to learn from effectively. Consider a customer churn prediction model. Your database might store:

  • Individual transaction records with timestamps
  • Customer service ticket logs
  • Product usage events

None of these are directly useful as model inputs. Feature engineering transforms this raw data into meaningful signals:

  • Recency -- Days since last purchase (derived from transaction timestamps)
  • Frequency -- Number of purchases in the last 30 days
  • Monetary value -- Average order value over the last 90 days
  • Engagement trend -- Is usage increasing, stable, or declining?
  • Support intensity -- Number of support tickets in the last 60 days

These engineered features give the model clear, informative signals to learn from.

Common Feature Engineering Techniques

Numerical Transformations

  • Scaling and normalization -- Putting features on comparable scales (e.g., age in years and income in thousands)
  • Log transformation -- Reducing the impact of extreme values (useful for revenue data, which is often skewed)
  • Binning -- Converting continuous values into categories (e.g., age groups: 18-25, 26-35, 36-45)

Categorical Encoding

  • One-hot encoding -- Converting categories into binary columns (e.g., country becomes separate columns for Singapore, Indonesia, Thailand)
  • Target encoding -- Replacing categories with the average target value for that category
  • Ordinal encoding -- Preserving order for ranked categories (e.g., low/medium/high satisfaction)

Time-Based Features

  • Day of week, month, quarter -- Capturing seasonal and cyclical patterns
  • Time since last event -- Recency signals
  • Rolling averages -- Smoothing noisy time series data
  • Holiday indicators -- Flagging regional holidays that affect behavior (Hari Raya, Songkran, Lunar New Year, etc.)

Text Features

  • Word counts, character counts -- Basic text statistics
  • TF-IDF scores -- Measuring word importance within documents
  • Sentiment scores -- Derived from sentiment analysis models
  • Embeddings -- Dense numerical representations from pre-trained language models

Interaction Features

  • Feature combinations -- Multiplying or dividing features to capture relationships (e.g., revenue per employee)
  • Ratio features -- Proportions that normalize for scale differences

The Feature Engineering Process

A practical workflow for feature engineering:

  1. Understand the business problem -- What are you trying to predict? What factors logically influence the outcome?
  2. Explore the data -- Use descriptive statistics and visualizations to understand distributions, correlations, and patterns.
  3. Brainstorm features -- Work with domain experts to identify potential signals. This is where business knowledge is most valuable.
  4. Create and test features -- Build the features and evaluate their predictive power using techniques like correlation analysis and feature importance scores.
  5. Select the best features -- Remove redundant or low-value features to keep the model simple and effective.
  6. Iterate -- Feature engineering is iterative. Initial model results often reveal opportunities for better features.

Southeast Asian Business Considerations

Feature engineering for ASEAN markets requires attention to regional specifics:

  • Holiday calendars -- Each country has different national and religious holidays that affect consumer behavior. Features should account for Hari Raya (Malaysia, Indonesia), Songkran (Thailand), Tet (Vietnam), and other regional celebrations.
  • Currency and economic variation -- Features involving monetary values need to account for exchange rates and purchasing power differences across countries.
  • Infrastructure differences -- Internet connectivity, mobile penetration, and logistics capability vary significantly across and within ASEAN countries. These contextual features can be highly predictive.
  • Cultural and linguistic features -- For text-based models, language, script, and communication style vary across the region and should be captured as features.
  • Regulatory environment -- Compliance-related features (e.g., data residency requirements, industry-specific regulations) may be relevant for models operating across borders.

Automated Feature Engineering

While manual feature engineering draws on domain expertise, automated tools can supplement the process:

  • Featuretools -- Open-source library for automated feature engineering on relational data
  • AutoML platforms -- Many AutoML tools include automated feature engineering as part of their pipeline
  • Feature stores -- Platforms like Feast, Tecton, and Hopsworks help teams manage, share, and reuse engineered features across projects

These tools do not replace domain knowledge but can accelerate the process and discover features that humans might miss.

The Bottom Line

Feature engineering is where business knowledge meets machine learning. It is the step where your industry expertise, customer understanding, and market knowledge become the fuel for your ML models. Investing in thoughtful feature engineering consistently delivers better returns than spending more on sophisticated algorithms or additional compute resources.

Why It Matters for Business

Feature engineering is the often-overlooked step that determines whether an ML project succeeds or fails. For CEOs and CTOs, this is important because it means your organization's domain expertise -- understanding of customers, markets, operations, and industry dynamics -- is a critical competitive advantage in AI. A competitor with better algorithms but worse features will build inferior models. Your business knowledge, when properly encoded as features, is your ML moat.

This has direct implications for AI project planning and staffing. The most effective ML teams combine data science skills with deep business domain expertise. When evaluating AI consulting partners or building internal teams, prioritize those who invest time understanding your business before writing code. A consulting engagement that spends 40% of its time on data exploration and feature engineering will typically outperform one that jumps straight to model building.

For Southeast Asian businesses operating across multiple markets, feature engineering is where regional complexity becomes an asset rather than a liability. Your understanding of how consumer behavior differs between Indonesian and Thai markets, how regional holidays affect demand patterns, and how infrastructure constraints shape logistics -- all of this knowledge becomes competitive advantage when encoded as features. Companies that invest in rich, market-specific feature engineering build models that consistently outperform generic, one-size-fits-all solutions.

Key Considerations
  • Invest 40-60% of your ML project time in data exploration and feature engineering -- this is where the highest ROI lies
  • Involve business domain experts in the feature brainstorming process; the best features come from people who deeply understand the problem
  • Build features that capture regional differences in ASEAN markets including holiday calendars, currency variations, and cultural patterns
  • Start with simple, interpretable features and add complexity only when it measurably improves model performance
  • Create a feature store or documented feature library so features can be reused across projects and teams
  • Be mindful of feature leakage -- including features that would not be available at prediction time in the real world, which leads to artificially inflated test results
  • Regularly review and update features as market conditions change; features that were predictive a year ago may have lost relevance

Frequently Asked Questions

Can feature engineering be fully automated?

Partially, but not fully. Automated tools like Featuretools and AutoML platforms can generate and test large numbers of candidate features from raw data. However, the most impactful features typically come from domain expertise -- understanding which business factors logically influence the outcome. The best approach combines automated exploration with human insight: let tools generate candidate features, but rely on domain experts to identify which ones are meaningful and to suggest features that automation would miss.

How do I know which features are most important?

Several techniques help identify important features. Tree-based models (like Random Forests and XGBoost) provide built-in feature importance scores. SHAP (SHapley Additive exPlanations) values offer model-agnostic feature importance with additional interpretability. Correlation analysis reveals linear relationships. Permutation importance measures how much model performance drops when each feature is randomly shuffled. Use multiple methods and look for consensus to build confidence in which features drive predictions.

More Questions

There is no magic number, but more features is not always better. Including too many features can lead to overfitting (especially with limited data), slower training, and harder model maintenance. A good rule of thumb: start with 10-30 well-chosen features for most business problems. Use feature selection techniques to remove redundant or low-value features. If you have fewer than 1,000 training examples, keep the feature count low. The ratio of training examples to features should ideally be at least 10:1.

Need help implementing Feature Engineering?

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