How to deal with a biased feature in Machine Learning (date) I have a model that predicts the lifespan of a horse. The dataset has samples from 1980 to 2019 and among the features there is one called birth_date, labeled with the lifespan in years for each horse. The problem is knowing that a horse usually lives between 20 and 30 years, if we look from 1980 to 1990 we have the full list of horses and their lifespans, but from 2000 to 2019 we see only samples of horses that were born and died within this time span but not the ones that are currently living, therefore the birth_date is a biased feature.

Is there a way to use the birth_date feature without having to worry about the biased data, or some technique to minimize his effects on the final predictions?
What you are describing are censored observations in survival analysis. Indeed, those who are still alive will obviously die but just at a later, observable date in a time frame past our study date. By counting them as survived on a logistic regression we will clearly bias our model to favor survivals for those particular horses, unrealistically.

Hence, you have survival data and should approach it like so. The Cox proportional hazards rate model allows you to relate hazard rate functions to predictors, and while many use linear models for the "predictor" part there are other ML methods like xgboost and random forests that have the ability to return Cox PH models. These models allow for censored observations as you describe.