I am using xgboost for binary classfication. I have infs and -infs in my data due to the fact I am calculating ratios from one col and and another e.g.
df[col1]/df[col2]. Since I have zeros and nans in these columns, it leads to me gettings infs, -infs, and nans.
I know xgboost can handle nan values, but if I replace the infs with a very large number e.g. 99999 or -99999 for -inf, is this an issue for xgboost? my understanding is that tree based methods for classification are unaffected by 'outliers'/inf values.
What would be best method to handle these?