JerryKurata / MachineLearningWithPython

Starter files for Pluralsight course: Understanding Machine Learning with Python
GNU General Public License v3.0
259 stars 389 forks source link

Different Result Although Same Logic and Data Source #5

Open aguskianto opened 6 years ago

aguskianto commented 6 years ago

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?

JerryKurata commented 6 years ago

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.