-
LightGBM missing values NULL 값ML 2023. 1. 5. 10:58
두 가지 방법이 있다.
1. missing 값 그대로 놔두고, 모델이 처리하게 놔두는 방법
아래처럼 디폴트로 missing value 취급
numercial features에서 missing value는 split할 때는 무시하다가, 가장 loss 줄어드는 split의 side에 배정된다. 가장 유력한 가지의 한 쪽에 배정된다는 뜻인듯?
categorical features에서는 항상 right side of split에 배정된다? 이것도 한 쪽에 배치된다는건가
https://github.com/microsoft/LightGBM/issues/2921
https://datascience.stackexchange.com/questions/65956/how-do-gbm-algorithms-handle-missing-data
2. negative 나 999 값으로 넣기.
https://datascience.stackexchange.com/questions/81846/handling-missing-values-for-lightgbm-model
-999 같이 넣으면 left branch로 배정한다.
그래서 1번 방법, 모델에 맡길지 2번 방법 직접 imputation 할지는 eda로 살펴볼 것을 권고한다.
'ML' 카테고리의 다른 글
PR AUC vs. AUC - imbalanced case (0) 2023.02.01 Lift score (0) 2023.01.30 PSM practice (0) 2022.12.15 PSM propensity score matching (0) 2022.12.13 Minhash & LSH (0) 2022.11.18