1
$\begingroup$

Forgive me if this is a somewhat naïve question.

I have trained an XGBoost classifier that uses COVID-19 patients' age, sex, location, etc. to predict their mortality risk (here is the dataset). The model did a pretty decent job. Now if we only know a new patient's age, can we use the trained model to predict their risk? If so, how can I implement it using scikit-learn?

Thanks for your suggestions in advance! Let me know if I should be more specific! Thanks!

$\endgroup$

1 Answer 1

1
$\begingroup$

You need to impute other features if you want to use the same model. Otherwise, the model won't accept your input. Typically, ML models don't decide to use or not use an information depending on its availability.

You'll either

  • construct a new model using only age as a feature, or
  • impute the features (e.g. mean substitution) and use the XGBoost with age and imputed features
  • models that predict (another kind of imputation) other features from age and then input your predictions into your final XGBoost model,
$\endgroup$
2
  • $\begingroup$ I see! I wonder if there's a principled way to choose between imputation and only using age. Thank you! $\endgroup$
    – ramund
    Commented Mar 26, 2020 at 21:38
  • $\begingroup$ @YuanMeng If the dataset is large, probably it wouldn't worth to cross-validate, tune and create different models in case of missing data. So, the preferable way is typically imputation. $\endgroup$
    – gunes
    Commented Mar 26, 2020 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.