Feature Engineering & Selection MCQs for the NSCT

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

Feature engineering is the work of turning raw columns into inputs a model can learn from; feature selection is choosing which of those inputs to keep. It is topic 10 of the 17 in the AI / Machine Learning and Data Analytics area, which carries 10% of the NSCT according to HEC's Areas of Competencies. Candidates averaged 50.8% accuracy in this area in 2026, per the HEC NSCT report.

The topic builds on Data Collection & Pre-processing and EDA. Expect small counting questions (how many columns, how many models) and scenario questions about leakage.

Feature creation

Feature creation means deriving new variables, usually from domain knowledge, that expose a pattern the model cannot easily find on its own. The common moves are:

Technique Example Why it helps
Ratio BMI = weight / height² One number captures what two columns only hint at
Interaction total = price × quantity Linear models cannot multiply features themselves
Polynomial add x² to fit a U-shaped curve A linear model in x² can fit curves
Log transform log10(income) Compresses a right-skewed tail
Binning age → 0–17, 18–40, 41+ Captures step changes, reduces noise
Date parts day of week, month, is_holiday Timestamps are useless as raw numbers
Cyclical encoding sin and cos of 2π·hour/24 Puts 23:00 next to 00:00
Encoding one-hot for nominal categories Avoids a false order between categories

A worked count: degree-2 polynomial expansion of n features, with the constant term, gives C(n + 2, 2) terms. For 2 features that is 6: 1, a, b, a², b² and ab.

Exam angle: counting questions are common. One-hot of k categories gives k columns (k − 1 if you drop one), and pairwise interactions of n features give n(n − 1)/2.

Selection methods

Feature selection keeps a subset of the original features to cut noise, training time and overfitting. It is different from feature extraction, such as PCA, which builds new features as combinations of the old ones (see Unsupervised Learning). Following the standard taxonomy of Guyon and Elisseeff, selection methods fall into three families.

Family How it works Examples Cost
Filter Scores each feature with a statistic, without training the final model Variance threshold, Pearson correlation, chi-square, mutual information, ANOVA F-test Cheap
Wrapper Trains the model on candidate subsets and keeps the best Forward selection, backward elimination, recursive feature elimination (RFE) Expensive
Embedded Selection happens while the model trains Lasso (L1), tree-based importance Moderate

Wrapper cost grows fast. Forward selection of 3 features out of 10 trains 10 + 9 + 8 = 27 models, while an exhaustive search tries 2¹⁰ − 1 = 1,023 subsets.

Two details catch students out. Pearson correlation only sees linear association, so a feature with r = 0 can still matter; mutual information catches non-linear dependence. And L1 regularisation can set coefficients exactly to zero, while L2 only shrinks them, so only Lasso performs selection.

Exam angle: you will be asked to classify a named method into one of the three families. Look for "retrains the model" (wrapper) versus "during training" (embedded).

Leakage

Data leakage happens when training data contains information that would not be available at prediction time. Evaluation scores look excellent, and then the model fails in production. There are two main kinds:

Time series add a third risk: a random shuffle lets the model train on the future. Use a time-based split instead.

Exam angle: a near-perfect validation score driven by one feature is the classic leakage signal in analysis questions.

Common traps

Worked examples

1. Understanding. Backward elimination starts with all features and removes the weakest one at a time, retraining the model at each step. Which family is it? Answer: wrapper. It uses the model's own performance to judge subsets, which is the defining feature of a wrapper.

2. Application. You expand features a and b to degree 2 and include the constant term. How many columns do you get? Answer: 6, namely 1, a, b, a², b² and ab. Using C(n + d, d) = C(4, 2) = 6 gives the same count.

3. Analysis. A churn model scores 98% on validation. Its top feature is account_closed_date, which is blank for active customers. What is wrong? Answer: target leakage. The closure date exists only because the customer has already churned, so a blank simply encodes "not churned". Drop the feature and re-evaluate; the honest score will be lower but will reflect production.

Practise

The quiz below has 100 questions on feature engineering and selection, filterable by tier and difficulty.

Practise: 100 questions

Interactive quiz loading. The first 10 questions are shown below.

  1. What does feature engineering mean in a machine learning project?

    1. Choosing the learning algorithm that gives the highest accuracy
    2. Using domain knowledge to create or transform input variables so the model can learn patterns more easily
    3. Tuning hyperparameters such as the learning rate and tree depth
    4. Collecting more labelled rows from the field
    Show answer

    Answer: B. Using domain knowledge to create or transform input variables so the model can learn patterns more easily

    Feature engineering works on the inputs: deriving ratios, date parts, interactions, encodings and transforms from raw data. Algorithm choice and hyperparameter tuning are model-selection steps, and collecting rows is data collection.

  2. How does a filter method of feature selection decide which features to keep?

    1. It scores each feature with a statistic such as correlation, chi-square or mutual information, without training the final model
    2. It trains the model repeatedly on different feature subsets and keeps the best subset
    3. It lets the model's own training shrink some weights to exactly zero
    4. It projects all features onto new orthogonal axes and keeps the top ones
    Show answer

    Answer: A. It scores each feature with a statistic such as correlation, chi-square or mutual information, without training the final model

    Filter methods rank features using a model-independent statistic, usually computed against the target. Retraining on subsets is a wrapper method, weight shrinkage during training is embedded, and projecting onto new axes is extraction such as PCA.

  3. Which of these is a wrapper method of feature selection?

    1. Variance threshold
    2. Sequential forward selection
    3. Ranking features by Pearson correlation with the target
    4. Lasso (L1-regularised) regression
    Show answer

    Answer: B. Sequential forward selection

    Forward selection adds one feature at a time and retrains the model to score each candidate, so the search 'wraps' around the model. Variance threshold and correlation ranking are filters; Lasso selects features while it trains, which makes it embedded.

  4. Which technique is an embedded feature selection method?

    1. Sequential forward selection
    2. A chi-square test between each feature and the class
    3. Lasso regression, whose L1 penalty drives some coefficients to exactly zero
    4. Mutual information ranking
    Show answer

    Answer: C. Lasso regression, whose L1 penalty drives some coefficients to exactly zero

    In embedded methods, selection happens as part of fitting the model. The L1 penalty in Lasso zeroes out weak coefficients during training. Forward selection is a wrapper; chi-square and mutual information are filters.

  5. In machine learning, what is data leakage?

    1. Training data is accidentally copied to a public server
    2. Information that would not be available at prediction time gets into training, so evaluation scores look better than real performance
    3. Rows with missing values are dropped during cleaning
    4. Model weights overflow during training
    Show answer

    Answer: B. Information that would not be available at prediction time gets into training, so evaluation scores look better than real performance

    Leakage means the model sees information from the future, the test set or the target itself that it will not have in production. It inflates validation scores, and the model disappoints after deployment. The other options describe a privacy incident, a cleaning step and a numerical problem.

  6. What is the difference between feature selection and feature extraction?

    1. Selection builds new combined features; extraction keeps a subset of the originals
    2. Selection keeps a subset of the original features; extraction (such as PCA) builds new features as combinations of the originals
    3. Both keep the original columns and only reorder them
    4. Selection is always unsupervised, while extraction always needs class labels
    Show answer

    Answer: B. Selection keeps a subset of the original features; extraction (such as PCA) builds new features as combinations of the originals

    Feature selection drops columns and keeps the survivors interpretable. Extraction maps the data into a new feature space; PCA's principal components are linear combinations of all the original features. PCA is itself unsupervised, so the last option is wrong.

  7. Why is one-hot encoding usually preferred over integer codes (Karachi = 1, Lahore = 2, Quetta = 3) for a nominal feature such as city?

    1. Integer codes impose a false order and distance between categories
    2. One-hot encoding always uses less memory
    3. Integer codes cannot be stored in a DataFrame
    4. One-hot encoding removes the need to scale numeric features
    Show answer

    Answer: A. Integer codes impose a false order and distance between categories

    With integer codes, a linear or distance-based model treats Lahore as sitting halfway between Karachi and Quetta, which is meaningless. One-hot gives each city its own 0/1 column with no implied order. It uses more memory, not less.

  8. When is a log transform a good feature engineering choice?

    1. For a strongly right-skewed positive feature such as income, to compress very large values
    2. To convert a categorical feature into numbers
    3. To fill in missing values in a column
    4. To turn a continuous feature into a 0/1 flag
    Show answer

    Answer: A. For a strongly right-skewed positive feature such as income, to compress very large values

    A log transform pulls in the long right tail so a few huge values do not dominate a linear model or a distance calculation. It needs positive inputs (log1p handles zeros). It does not encode categories, impute values or binarise.

  9. What does the 'curse of dimensionality' mean for feature engineering?

    1. Adding features always improves accuracy because the model has more information
    2. Models cannot be trained once there are more than 100 features
    3. As the number of features grows, the data becomes sparse in feature space, so models (especially distance-based ones like k-NN) need far more samples
    4. High-dimensional data always has perfectly correlated features
    Show answer

    Answer: C. As the number of features grows, the data becomes sparse in feature space, so models (especially distance-based ones like k-NN) need far more samples

    The volume of the feature space grows exponentially with the number of dimensions, so a fixed number of points becomes sparse and 'nearest' neighbours stop being near. This is one reason to select or extract fewer, more informative features. Extra features can hurt accuracy.

  10. What does a variance threshold selector remove?

    1. Features whose variance is below a set cut-off, such as constant or near-constant columns
    2. Features that are highly correlated with the target
    3. The features with the highest variance
    4. Only features that contain missing values
    Show answer

    Answer: A. Features whose variance is below a set cut-off, such as constant or near-constant columns

    A variance threshold looks only at each feature's own spread and ignores the target, so it is an unsupervised filter. A column that has the same value in almost every row carries little information and is dropped. It never targets the highest-variance features.

FAQs

Is feature selection the same as dimensionality reduction?

Selection is one form of dimensionality reduction, but not the only one. Selection keeps a subset of the original columns, so they stay interpretable. Extraction methods such as PCA create new axes that mix every original feature. Both reduce the number of inputs; exam questions usually test which one keeps the original features.

Should I scale features before or after the train/test split?

After. Split first, fit the scaler on the training set only, then use it to transform both training and test sets. Fitting on the full dataset leaks the test set's mean and spread into training. The same rule applies to imputers, encoders and feature selectors.

Is RFE a wrapper or an embedded method?

Most textbooks call recursive feature elimination a wrapper, because it retrains the model repeatedly and removes the weakest features each round. It uses the model's coefficients or importances to rank features, which is why some sources describe it as a hybrid. If an option says "wrapper", that is the standard answer.

Next step

Continue to Deep Learning Fundamentals MCQs, the next topic in the official order. Revisit the AI & ML MCQs hub to pick another topic, or test yourself in an NSCT mock test.