フリー問題

NVIDIA-Certified Professional: Accelerated Data Science のフリー問題 16 / 20 問目

問題文

A feature is built as the mean of the target for each category. Which construction avoids leaking the target into the training features?

選択肢

  1. Compute the category means over the whole table once, before the split, so that the same encoding is applied consistently to every row and the training and holdout parts cannot end up with different values for the same category, which would otherwise make the holdout score hard to interpret.
  2. Add small random noise to the category means so that the encoding cannot be inverted to recover the target, which keeps the useful signal while masking the individual values it was built from.
  3. Use the category counts instead of the target means.
  4. Compute each row's encoding from the target values of other rows only, using out-of-fold means, and apply the encoding learned on the training part to the holdout.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。