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

ValueError while executing Fit method

ValueError while executing Fit method

0
Votes
1
Answer

Team, I am seeing the below error while executing the Fit method for Logistic Regression in the Credit Risk Modelling course. I made sure I have ran and generated all the train and test files the way it was provided in the notebook. Can you please help me fix it.
Code:reg.fit(inputs_train,loan_data_targets_train)
Error:- ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’).

1 Answer

365 Team
0
Votes

Hi Debashish,
This error usually comes up when you have not preprocessed all data properly. Please check if there are NaN values in your cells and try to troubleshoot why you have reached them.
Best,
The 365 Team

×
EXTENDED SALE
Learn Data Science this Summer!
Get 50% OFF