nerdexam
SAS_Institute

A00-240 · Question #46

An analyst knows that the categorical predictor, zip_code, is an important predictor of a binary target. However, zip_code has too many levels to be a feasible predictor in a model. The analyst uses…

The correct answer is A. Clustering the levels using the target proportion for each zip_code as input. Greenacre's method is designed to reduce categorical levels by merging those that are most similar in their relationship to the target variable. For a binary target, the relevant summary for each zip_code level is its target proportion (i.e., the rate at which the target = 1)…

Logistic Regression

Question

An analyst knows that the categorical predictor, zip_code, is an important predictor of a binary target. However, zip_code has too many levels to be a feasible predictor in a model. The analyst uses PROC CLUSTER to implement Greenacre's method to reduce the number of categorical levels. What is the correct application of Greenacre's method in this situation?

Options

  • AClustering the levels using the target proportion for each zip_code as input.
  • BClustering the levels using the zip_code values as input.
  • CClustering the levels using the number of cases in each zip_code as input.
  • DClustering the levels using dummy coded zip_code levels as inputs.

How the community answered

(37 responses)
  • A
    81% (30)
  • B
    5% (2)
  • C
    11% (4)
  • D
    3% (1)

Explanation

Greenacre's method is designed to reduce categorical levels by merging those that are most similar in their relationship to the target variable. For a binary target, the relevant summary for each zip_code level is its target proportion (i.e., the rate at which the target = 1), so this proportion is used as the clustering input - levels with similar proportions get merged, preserving the variable's predictive signal.

Option B is wrong because clustering on the zip_code values themselves (numeric codes) groups geographically/numerically adjacent codes, which tells you nothing about their relationship with the target. Option C is wrong because grouping by case count conflates frequency with predictive behavior - a rare zip_code and a common one can have the same target proportion and should be merged. Option D is wrong because dummy coding each level before clustering just restates the original high-cardinality problem in matrix form and doesn't leverage the target at all.

Memory tip: Think of Greenacre's method as "merge zip codes that look the same to the target." The only input that captures how a level looks to the target is the target proportion - everything else (code value, count, dummy encoding) describes the level itself, not its predictive behavior.

Topics

#Categorical level reduction#Greenacre's method#Binary classification#Categorical preprocessing

Community Discussion

No community discussion yet for this question.

Full A00-240 Practice