0
$\begingroup$

Here is a interview task of training a binary classification model. I will not show the detail of training data as the confidential issue. The variable $X$ has ten features and all the features are categorical value. Let's ignore the actual meaning of the data and just regard as a general binary classification problem with categorical features. Could you give me a few suggestions based on my answers and interviewee's feedback? Pls note that it is a 3 hours online task, we will not consider the tools which is too complicate.

My answer:

Principle:

  1. The features of sample are almost categorical. Therefore we use Greedy Target Statistics(TS) to numeric the categorical features. For the category i of a feature, we use $$\text{TS = (count(cat = i && label=1) + a*p )/(count(cat = i) + a)}$$ here a is the given hyper-parameter and $$\text{p = count(label=1)/(number of samples),}$$ the global mean. (a,p) is used to smooth the value to avoid the trivial case (see Greedy TS)
  2. Use logistic regress as learner

The process of training is:

  1. Manually select features:discard columns 'Date' (no information), 'Product' (covered by 'Sub product'), 'Zipcode' (too many categories, may lead overfitting)

  2. Use TS to numeric feature

  3. Data processing:

    a) discard feature below 1 std

    b) max-min standardization

    c) Use tree model for feature selection

  4. Training a logistic regression

Interviewee's feedback associate with my understanding:

  1. No exploratory data analysis or cross validation: does that mean I need to show the statistics of raw data? like mean, std, correlation between features, e.t.c

  2. Feature selection and visualization was not in line with what we would expect from a candidate: We should print the scores of features based on the feature selection model?

  3. No optimization: the optimization of hyper-parameter like value of a and choice of learner?

Let's ignore the weakness of Greek TS. I am not sure my understanding is correct and what should I do properly based on interviewee's feedback.

Tell me the information you need and I will update if I can.

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy