MachineLearningWithPython icon indicating copy to clipboard operation
MachineLearningWithPython copied to clipboard

Different Result Although Same Logic and Data Source

Open aguskianto opened this issue 7 years ago • 1 comments

I follow your tutorial for Pima-Prediction, and use "./data/pima-data.csv".

My result: image

Your result (origin exercise file): image

What makes it different?

aguskianto avatar Mar 10 '18 11:03 aguskianto

If you go to the course discussion there is a thread on this. Essentially later version of matplot lib changed the default colors. Here were the instructions that fixed the issue.


I suspect that your machine has version 2.0 or greater of MatPlotLib installed. Version 2.0 changed a number of things including the default color schemes.

Please add the following to your notebook by the Imports statements

import matplotlib print(matplotlib.version)

if this outputs 2.0 or later the colors will be different.

To fix the colors add these lines

to reset most of matplotlib to classic, pre-2.0, colors and styles

matplotlib.style.use('classic')

This should fix the colors.

JerryKurata avatar Mar 10 '18 14:03 JerryKurata