PAIR-code / facets

Visualizations for machine learning datasets
https://pair-code.github.io/facets/
Apache License 2.0
7.36k stars 886 forks source link

Unable to select scatter plot vertical/horizontal position #86

Closed secsilm closed 6 years ago

secsilm commented 6 years ago

Install

git clone https://github.com/PAIR-code/facets
cd facets
jupyter nbextension install facets-dist/

Issue

  1. I run the facets/facets_dive/Dive_demo.ipynb in my jupyter notebook. But I found that I can't select Vertical Position and Horizontal Position in Positioning panel. There is just a <DEFAULT>.

screenshot

  1. How are these data points arranged by default? What's the x-axis and y-axis?

Thank you.

Environment

Python: Python 3.5.2 :: Anaconda custom (64-bit) System: Windows 10 1709

jameswex commented 6 years ago

Are you able to select features for column-based and row-based faceting? Is it just the scatter plot mode that is failing?

By default the points I believe are just arranged in the order they appear in the dataset (left to right, down to up). Until you select a feature for vertical or horizontal position (which it doesn't seem like you are able to do), the points won't be rearranged from their default positions.

In general, only the features that are determined to be numeric are available in the scatter position dropdowns. So perhaps in your case the facets dive logic is incorrectly finding all of the features to be non-numeric.

If you can do row-based faceting, what happens when you select the Age feature? Does it break Age up into 10 different buckets for ranges of ages, or does it do one bucket per individual age number? This will help me understand if on your system it is failing to determine that Age is a numeric feature. Thanks.

secsilm commented 6 years ago

@jameswex Yes, I can do row-based and column-based faceting. It does break Age up into 10 different buckets for ranges of age. Just can't select feature in the scatter plot mode .

This is the dtypes of the df.

Age                int64
Workclass         object
fnlwgt             int64
Education         object
Education-Num      int64
Marital Status    object
Occupation        object
Relationship      object
Race              object
Sex               object
Capital Gain       int64
Capital Loss       int64
Hours per week     int64
Country           object
Target            object
dtype: object
jameswex commented 6 years ago

Really interesting. Does the problem go away if you re-run the cell to create Dive, or use a different dataset that also includes numeric columns? Or does this always happen for you?

secsilm commented 6 years ago

Really weird! Today I rerun the facets/facets_dive/Dive_demo.ipynb and it just works. Unbelieveable. 😱