data splitting from credit risk modeling
I don't understand this line of code
train_test_split(loan_data.drop('good_bad', axis = 1), loan_data['good_bad'])
why do we drop [good_bad] and then expect it in loan_data['good_bad'] as a result. I would like to have more clarification about. I failed to understand it for multiple time
1 answers ( 0 marked as helpful)
Our target var is 'good_bad', thus it has to be separeted from all other vars which are the inputs.
In the parentheses the first item (loan_data.drop('good_bad', axis = 1) refers to inputs and second one to the target var itself (loan_data['good_bad']).
Submit an answer
Module4. Credit Risk Modeling. Section 6. Could you post the 4 test and train csv files.
MemoryError: Unable to allocate 174. MiB for an array with shape (49, 466285) and data type float64
employment length’ variable and the ‘earliest credit line variable’ we preprocessed in the last lect