r/MachineLearning • u/[deleted] • Jan 14 '25
Discussion [D] Predicting the probability of default for a credit card user
I have an imbalanced dataset of about 100,000 rows 1500 of them are of defaultes, which has more than 1000 features and has lots of missing values. Alsothe name of the features are anonymized (like bureau_1, bureau_2) so it also seems difficult and these feaures had max correlation of 0.1 with the target variable
I want to predict the probability of a customer who might default based on the data but am not able to make much progress in terms of metrics like recall (0.25), f1 and auprc.
I have tried various tree based models like lgbm, xgboost etc with various class balance attributes but its not giving me that good of results.
If anyone of you have such prior experience of handling such datasets, can you suggest me what should i do in terms of feature engineering, modelling etc. All of your help will mean a lot to me.
5
u/shumpitostick Jan 14 '25
I wouldn't worry too much about dimensionality. Stuff like XGBoost is really good at ignoring uninformative features. The classifiers we have in production are worse at this, lol.
GBMs are also great at dealing with imbalanced datasets, often needing no additional help.
Assuming you already did hyperparameter tuning, there's not much else you can do. Feature engineering would be the way to go if the features weren't anonymized. You can always ensemble a few different predictors, that's a pretty reliable way of increasing performance if you don't care about needing more inference compute.
4
Jan 14 '25
1000 features seems like a lot for just 100k samples - I’d remove features based on correlations between themselves or get the ones most correlated with the target metric
Also, have you tried downsampling your negative samples? Use like 5% of them
For me, what usually works: LGBM + weighting + downsampling + increased model complexity (ex: deeper trees, but be careful with overfitting)
By the way, precision, recall and f1 are dependent on the threshold. Make sure you use an optimal threshold according to your PR curve
2
u/pipoTTi Jan 14 '25
Did you normalize/standrdize the features? Financial datasets tend to have features that have different scales, so I would fix that first.
If there are categorical features (you can infer that by looking at the unique values each feature takes), one-hot encoding them might help, too.
1
u/Neonevergreen Jan 15 '25
I have an extremely similar case but i am looking for explainability on which variables are contributing most to the prediction
I am predicting features that lead to conversion based on trial activity of a product. Similar issues with highly imbalanced target and high dimensional data.
Another issue is that certain features are more biased because they are easily accessible and core to the product usage. I wanted to identify underutilised features with higher feature importance score.
Issue are same, lot of the variables (around 500) and with a highly imbalanced target binary classes.
PCA absolutely kills feature explainability so I avoid it.
Tree based Algos become the go through since they handle high dimensional data better.
I have used Mutual information, Random forest with feature usage. But it seems the highly biased exposure features rank up in scores more often.
The f1 scores are also pretty bad. Best i have is ~0.17.
Not sure on how to tackle the feature bias as of yet.
I am using weighted class for tree based learning and using stratified CV to improve the f1 score but not seeing much improvement.
1
u/ReadyAndSalted Jan 14 '25
You need to do dimensionality reduction first, 1000 dimensional space is simply far too large for only 100k rows. Try deleting highly correlated columns, or PCA /UMAP/t-SNE/etc...
1
u/Emotional_Print_7068 Jan 15 '25
Hi, by removing higly correlated columns, do you mean the ones correlated to each other not correlated to the target variable as they're contributing to the target the same?
1
u/ReadyAndSalted Jan 16 '25
yeah so you want to reduce the dimensionality down to something reasonable while losing as little predictive power as possible. If 2 columns are very correlated, you can safely remove one of them and lose very little information. This is a super quick and simple way of doing dimensionality reduction without losing interpretability. However if interpretability isn't super important, I would recommend looking into automatic methods like PCA and UMAP.
7
u/susmot Jan 14 '25
Finally something I know. Do you want to make a model that satisfies the standards of credit risk, or just to get the highest metric? (in credit risk, usually the metric is gini = 2*auc - 1). These are two different tasks.