3 ms·
minimum_credit_score = Loan.joins(:borrower).where("loans.default = true").average("borrowers.credit_score") if loan_applicant.credit_score > minimum_credit_sc
by forgingahead 5y ago
minimum_credit_score = Loan.joins(:borrower).where("loans.default = true").average("borrowers.credit_score")
if loan_applicant.credit_score > minimum_credit_score
decision = "approve"
else
decision = "reject"
end
- zwaps 5y agoWould a linear decision barrier not be fit by the logistics model?
- ant6n 5y agoYou want to use the average credit scores of all defaulting loans as threshold? That seems really low, you're setting your bank up for a lot of defaults. But then there's a lot of selection bias in your data -- presumably your bank has been denying loans to people with bad scores, so over time you your minimum credit score is the upward inching average inside the cracks between safe and denied loads.
- sokoloff 5y agoIt depends heavily on the interest rate as well. If the interest rate is high enough, you can show a profit even with a fair number of loans sent to collections.
- blitzar 5y agoOn a long enough timeline minimum_credit_score will converge towards maximum_possible_credit_score.