The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

PD model Estimation – Jupyter Notebook error

PD model Estimation – Jupyter Notebook error

1
Vote
1
Answer
the following error occurs when i try to estimate the co-efficients for inputs_train and loan_data_targets_train using LogisticRegression:
Input contains NaN, infinity or a value too large for dtype('float64')

1 Answer

Hi Dan,
I ‘ve faced the same issue when I try regression part. The root cause of problem is inputs_train dataset have NaN  valued column. you can check the null values in input_dataset columns inputs_train.isnull().sum()
I’ve followed the classroom codes and the main issue is caused by the creation of inputs_train_with_ref_cat variable.  You should update the last column ‘mths_since_last_record:>=86’ to ‘mths_since_last_record:>86’ to run regression properly.
 
 

Hi Buğra, I’ve changed the last column ‘mths_since_last_record:>=86’ to ‘mths_since_last_record:>86’ to all the dataframes below and it works. Thanks. 🙂

6 months