1
$\begingroup$

I am working on Haberman's cancer survival data set.

I tried to visualize the pair plot with features as AGE, Op_Year, axil_nodes_det and target variable as Surv_status. I expect 12 plots but getting 16 including plots with Surv_stautus which is my target variable here is my code:

sns.set_style("whitegrid"); sns.pairplot(patients, hue="Surv_status", size=3); 
$\endgroup$
1
  • $\begingroup$ Have you Dropped that column temporarily? $\endgroup$ Commented Oct 1, 2018 at 10:36

1 Answer 1

0
$\begingroup$

maybe because Surv_status is number. there are two solution:

  1. define variables:

    sns.set_style("whitegrid"); sns.pairplot(patients, hue="Surv_status",vars=["AGE", "Op_Year", "axil_nodes_det"], size=3); 
  2. change target value to a string:

    patients['Surv_status'] = patients['Surv_status'].astype(str) 

or

 patients['Surv_status'] = patients['Surv_status'].str 
$\endgroup$
0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.