Credit Risk Modeling for Loan Approvals

Company: Phonepe ML engineer_19april

Difficulty: medium

Problem Statement

Credit Risk Modeling for Loan Approvals A regional bank wants to improve its loan approval process with a model that predicts the likelihood of loan default. The bank has collected data on past loan applicants (personal information, financial history and loan details), and the risk management team wants to automate the initial screening of new applications. Your task is to preprocess the training data, build a binary classifier, and output, for every test applicant, the predicted probability that the loan defaults ( default = 1 ). So that every submission can be judged exactly, the preprocessing and the model are fixed below (inferred -- the original task left preprocessing and algorithm choice open and scored AUC-ROC on a hidden 12,000 / 3,000-row dataset; here the classic pipeline "median imputation + one-hot encoding + Gaussian Naive Bayes" is specified so the probabilities are fully determined) . Implement the function solve(train_df, test_df) . It receives the two tables as pandas