Created
December 23, 2018 09:06
-
-
Save dice89/0eeafb35320940554dd2b5bdd777f885 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
import numpy as np | |
from sklearn.datasets import load_breast_cancer | |
sns.set() | |
data = load_breast_cancer() | |
breast_cancer_df = pd.DataFrame(data['data']) | |
breast_cancer_df.columns = data['feature_names'] | |
breast_cancer_df['target'] = data['target'] | |
breast_cancer_df['diagnosis'] = [data['target_names'][x] for x in data['target']] | |
sns.set() | |
corr = breast_cancer_df[list(data['feature_names'])].corr(method='pearson') | |
cols = ['worst concave points', 'mean concavity', | |
'worst perimeter', 'worst radius', | |
'worst area'] | |
sns.pairplot(breast_cancer_df, | |
x_vars = cols, | |
y_vars = cols, | |
hue = 'diagnosis', | |
palette = ('Red', '#875FDB'), | |
markers=["o", "D"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment