Sklearn Bug | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Sklearn Bug

I'm following the machine learning tutorial, seeing how much I can remember. I keep getting an error. I converted the "male" and "female" values to True or False but it still reads them as a float. I even copied the predicted values and the line of code (converting the genders to booleans) from the Sololearn tutorial but it still throws an error. What have I done wrong, even copy and paste don't fix. https://code.sololearn.com/c4Fm1xwp3qjA/?ref=app

18th Jul 2020, 9:22 AM
Clueless Coder
Clueless Coder - avatar
2 Answers
+ 3
Of course it would say error. You created a male column but used the old sex column. https://code.sololearn.com/ctbUL6pIyW20/?ref=app
18th Jul 2020, 9:27 AM
Arnesh
Arnesh - avatar
+ 1
Arnesh Thanks
18th Jul 2020, 9:28 AM
Clueless Coder
Clueless Coder - avatar