ladderlore
  • S3 သို့မဟုတ် IAM လို service အမည်ကို ရိုက်ထည့်ပါ။

သဘောတရား · AIF-C01 အပေါ် ဆက်လေ့လာရန်

Feature engineering techniques

Scale, encode, split and reduce features, and know which algorithms care about scale.

ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။

AI Practitioner မှ သင်သိပြီးသားများ

  • A feature is an input to a model. Training data is split into training, validation and test sets.
  • Feature engineering shapes raw columns into inputs a model can learn from.
  • Missing values and categories need handling before training.
AI Practitioner သင်ခန်းစာကို ဖတ်ရန်
  • Standardization

    What it does
    Mean 0, spread 1
    Use it when
    Distance or gradient models
  • Min-max

    What it does
    Rescales to 0 to 1
    Use it when
    A bounded range is needed
  • Log transform

    What it does
    Pulls in a long tail
    Use it when
    Skewed counts or money
  • Binning

    What it does
    Number to ranges
    Use it when
    Steps or noisy values
Four ways to shape numeric features.
  • One-hot

    What it does
    A 0 or 1 column per category
    Use it when
    Few unordered categories
  • Ordinal

    What it does
    Ordered categories to integers
    Use it when
    Size or grade
  • Target encoding

    What it does
    Category to its average target
    Use it when
    Many categories
  • Feature splitting

    What it does
    Date to year, month, weekday
    Use it when
    Hidden parts matter
  • PCA

    What it does
    Fewer combined components
    Use it when
    Too many correlated features
  • TF-IDF

    What it does
    Scores words by rarity
    Use it when
    Text for classic models
Encoding, splitting, reduction and text scoring.

1 / 2

  • One-hot

    What it does
    A 0 or 1 column per category
    Use it when
    Few unordered categories
  • Ordinal

    What it does
    Ordered categories to integers
    Use it when
    Size or grade
  • Target encoding

    What it does
    Category to its average target
    Use it when
    Many categories

2 / 2

  • Feature splitting

    What it does
    Date to year, month, weekday
    Use it when
    Hidden parts matter
  • PCA

    What it does
    Fewer combined components
    Use it when
    Too many correlated features
  • TF-IDF

    What it does
    Scores words by rarity
    Use it when
    Text for classic models
Encoding, splitting, reduction and text scoring.

ဘာလဲ

Numeric features: standardization (z-score) subtracts the mean and divides by the standard deviation, so values center on 0. Min-max normalization rescales values to a range, usually 0 to 1. A log transform pulls in a long right tail, such as income or counts. Binning turns a number into ranges, such as age groups, to capture steps or reduce noise. Fit the scaler on the training set only, then apply it to validation and test data.

ဘာလဲ

Scale matters to models that use distances or gradients: k-NN, k-means, support vector machines, linear and logistic regression, neural networks and PCA. Tree-based models, such as XGBoost and random forests, split on thresholds and do not care about scale.

ဘာလဲ

Categorical features: one-hot encoding makes a 0 or 1 column per category and suits few categories with no order. Ordinal encoding maps ordered categories (small, medium, large) to integers. Target encoding replaces a category by the average of the target and handles many categories, but must be computed carefully to avoid leakage. Feature splitting breaks a field into parts, such as a date into year, month and weekday. Feature selection drops features that add little. PCA combines features into fewer components. TF-IDF scores words by how special they are to a document.

မှတ်ထားရန်

  • Z-score: mean 0. Min-max: a fixed range. Log: tames skew. Binning: ranges.
  • Fit scalers on training data only.
  • Scale matters for k-NN, k-means, SVM, linear models, neural networks and PCA.
  • Trees (XGBoost, random forest) do not need scaling.

မှတ်ထားရန်

  • One-hot for few unordered categories. Ordinal for ordered ones. Target encoding for many.
  • Split dates. Select features. PCA reduces dimensions. TF-IDF scores words.

စာမေးပွဲမှာ

  • “A right-skewed income column hurts a linear model” points to a log transform.
  • “Many distinct categories, one-hot would be huge” points to target encoding, with care for leakage.
  • “Scaling is not needed for this model” points to a tree-based algorithm such as XGBoost.